1
0
Advent-of-Code/README.md

2.3 KiB

Advent of code

My participation to advent of code 2024.

Did it in zig, trying to be as memory efficient and fast as possible.

Benchmark

Done with 1000 epoch on a AMD Ryzen 7 7800X3D with a Samsung SSD 980 PRO 2TB (up to 7,000/5,100MB/s for read/write speed) on one thread.

Can be run with zig run -O ReleaseFast benchmark.zig

Day Part Mean (μs) Min (μs) Max (μs)
1 1 +25 ± 6.93 +23 +67
1 2 +25 ± 4.69 +24 +50
2 1 +35 ± 3.00 +33 +45
2 2 +266 ± 15.17 +251 +329
3 1 +25 ± 2.45 +24 +40
3 2 +18 ± 2.00 +17 +28
4 1 +217 ± 4.47 +211 +232
4 2 +218 ± 5.10 +212 +239
5 1 +175 ± 50.21 +131 +353
5 2 +141 ± 22.93 +130 +252
6 1 +32 ± 1.73 +31 +42
6 2 Too long ~60s 0 0
7 1 +211 ± 16.19 +189 +288
7 2 Too long ~0.2s 0 0
----- ------ ------------------- ---------- ----------
8 1 +511 ± 13.93 +497 +581
8 2 +844 ± 46.60 +805 +1095
9 1 +1514 ± 122.07 +1307 +1811
9 2 Too long ~0.6s 0 0
10 1 +37 ± 7.87 +35 +83
10 2 +28 ± 5.57 +27 +62
11 1 +2139 ± 291.76 +1931 +2989
11 2 +5060 ± 159.47 +4903 +5580
12 1 +44947 ± 1417.02 +43224 +49471
12 2 +48279 ± 2536.03 +45591 +57175
13 1 +1522 ± 119.51 +1445 +2178
13 2 Too long ~6h 0 0
14 1 +137 ± 5.10 +130 +165
14 2 Need input 0 0
----- ------ ------------------- ---------- ----------
15 1 +71 ± 41.96 +42 +182
15 2 +200 ± 34.13 +172 +301
Total +106677 ± 4935.90 +101385 +123638