Commit c005469
committed
adventofcode/cc: add solution for 2022/22.
Oof, this one took way too long. I wanted to create a generic solution for part
2 but eventually needed to take help from Reddit. And, when I had done that, I
battled a non-deterministic bug that only showed up in <1% of test runs. When I
finally found the bug (I had missed to compare the `z` coordinates in
`operator==`) I didn't have enough energy to refactor the code and make it
nicer.
Benchmarks from `./bazel run -c opt //adventofcode/cc/year2022:day19_benchmark`:
2023-07-21T21:07:22+01:00
Running /home/saser/.cache/bazel/_bazel_saser/06ad534583e887506ca6aa175f8ed7b5/execroot/code/bazel-out/k8-opt/bin/adventofcode/cc/year2022/day22_benchmark
Run on (16 X 4679.3 MHz CPU s)
CPU Caches:
L1 Data 32 KiB (x8)
L1 Instruction 32 KiB (x8)
L2 Unified 512 KiB (x8)
L3 Unified 16384 KiB (x1)
Load Average: 1.16, 1.07, 2.06
***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.
-----------------------------------------------------------------
Benchmark Time CPU Iterations
-----------------------------------------------------------------
BM_Part1/day22.real.in 96366 ns 96287 ns 7247
BM_Part2/day22.real.in 140836 ns 140283 ns 49411 parent d6dffcf commit c005469
File tree
8 files changed
+882
-0
lines changed- adventofcode
- cc/year2022
- data/year2022
8 files changed
+882
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
821 | 861 | | |
822 | 862 | | |
823 | 863 | | |
| |||
0 commit comments