Skip to content

jsgonsette/AdventOfCode2024

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My solutions for the Advent of Code 2024 puzzles, in Rust

AoC in Rust

Usage

  1. The application expects your input files to be in the ./input/2024 directory. Each file must be named according to the day number: 01.txt, .. 25.txt.
  2. There is only one binary to compile, that invokes all the daily puzzles in sequence (see ./src/main.rs )

Performance

I focus on code readability and usability first, instead of seeking for performance at all cost. As such, this code is well documented and should be very understandable. Here are the results I get to solve the two parts of the problems:

All benchmarks are run on an AMD Ryzen 9 5900X, single thread

Day Puzzle Code Perf. (ms)
01 Historian Hysteria day_01.rs 0.144
02 Red-Nosed Reports day_02.rs 0.311
03 Mull It Over day_03.rs 0.094
04 Ceres Search Hysteria day_04.rs 0.287
05 Print Queue day_05.rs 2.842
06 Guard Gallivant day_06.rs 82.53
07 Bridge Repair day_07.rs 18.76
08 Resonant Collinearity day_08.rs 0.093
09 Disk Fragmenter day_09.rs 5.824
10 Hoof It day_10.rs 1.446
11 Plutonian Pebbles day_11.rs 14.03
12 Garden Groups day_12.rs 2.043
13 Claw Contraption day_13.rs 2.134
14 Restroom Redoubt day_14.rs 32.20
15 Warehouse Woes day_15.rs 1.727
16 Reindeer Maze day_16.rs 10.14
17 Chronospatial Computer day_17.rs 0.082
18 RAM Run day_18.rs 6.966
19 Linen Layout day_19.rs 21.86
20 Race Condition day_20.rs 54.94
21 Keypad Conundrum day_21.rs 0.158
22 Monkey Market day_22.rs 47.69
23 LAN Party day_23.rs 7.036
24 Crossed Wires day_24.rs 0.351
25 Code Chronicle day_25.rs 0.266

Show results
Day Puzzle Code Perf. (ms)
01 Calorie Counting day_01.rs 0.081
02 Rock Paper Scissors day_02.rs 0.090
03 Rucksack Reorganization day_03.rs 0.072
04 Camp Cleanup day_04.rs 0.115
05 Supply Stacks day_05.rs 0.157
06 Tuning Trouble day_06.rs 0.011
07 No Space Left On Device day_07.rs 0.067
... ... ... ...
15 Beacon Exclusion Zone day_15.rs 0.114
16 Proboscidea Volcanium day_16.rs 2.755
17 Pyroclastic Flow day_17.rs 0.653
18 Boiling Boulders day_18.rs 7.153
19 Not Enough Minerals day_19.rs 40.15
20 Grove Positioning System day_20.rs 56.95
21 Monkey Math day_21.rs 5.788
22 Monkey Map day_22.rs 0.434
23 Unstable Diffusion day_23.rs 711.1
24 Blizzard Basin day_24.rs 55.07
25 Full of Hot Air day_25.rs 0.017

About

Advent of Code, in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages