2025-12-01 16:32:51 -05:00
2025-12-01 02:02:04 -05:00
2025-12-01 16:32:51 -05:00
2025-11-30 00:34:06 -05:00
2025-12-01 16:32:51 -05:00
2025-12-01 16:26:42 -05:00

Advent of Code 2025

https://adventofcode.com/2025

Building

Everything is handled by cmake which most ide's can handle. Make sure you have a compiler (MSVC or GCC), CMake, and make/ninja installed.

If you're using make to build the project, run the following commands:

  1. mkdir build
  2. cd build
  3. cmake .. -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
  4. make -j <number of threads>

If you're using ninja to build the project, run the following commands:

  1. mkdir build
  2. cd build
  3. cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja
  4. ninja

Directory structure

  • src: Contains the source code for each day.
  • src/common: Contains some generalized headers that are used by multiple days.
  • src/dayX: Contains the source code for day `X
  • src/dayx/pY: Contains the source code for part Y of day X
  • input: Contains the input for each day.

Types

During this challenge, I plan to have multiple different types of solutions.

  • Normal: A more "normal" solution, opting for more readable code without doing anything fancy.
  • Faf: The fastest solution I can think of.

Each solution has its own executable following the following naming convention: dXpY-type. Where X is the day number, pY is the part number, and type is the type of solution (Normal omits the type all together Ex: a normal day1 part1 executable would be d1p1).

Benchmarks

All benchmarks are running using the timer class defined in src/common/timer.h.
"Normal" solutions are only run once, as they aren't designed to be as fast as possible.
"Faf" solutions are run multiple times to get a more accurate average.
All benchmarks include file IO, mostly because everything calculates within single digit microseconds or less.

All benchmarks are run on a system with the following specs:

  • CPU: AMD Ryzen 9 8945HS
  • RAM: 32GB DDR5 6000MHz
  • SSD: Samsung 990 Pro
  • OS: Windows 11 24H2
  • Compiler: gcc version 13.2.0 (x86_64-posix-seh-rev0, Built by MinGW-Builds project)
Day Part Type Time (us) Iterations
1 1 faf 43 100000
1 1 Normal 483 1
1 2 Normal 472 1
Description
No description provided
Readme 108 KiB
Languages
C++ 96.5%
CMake 3.5%