These are my solutions in F# for Advent of Code 2017 and 2018. If you were wanting to try it out, you should be able to open the .sln file in Visual Studio 2017 with Visual F# tools installed and it should all just work.
Benchmarks are performed using BenchmarkDotNet on the following specs:
BenchmarkDotNet=v0.11.3, OS=Windows 10.0.17134.471 (1803/April2018Update/Redstone4)
Intel Core i5-7600K CPU 3.80GHz (Kaby Lake), 1 CPU, 4 logical and 4 physical cores
Frequency=3703130 Hz, Resolution=270.0418 ns, Timer=TSC
.NET Core SDK=2.2.100
[Host] : .NET Core 2.2.0 (CoreCLR 4.6.27110.04, CoreFX 4.6.27110.04), 64bit RyuJIT DEBUG
DefaultJob : .NET Core 2.2.0 (CoreCLR 4.6.27110.04, CoreFX 4.6.27110.04), 64bit RyuJIT
Year | Day | Part | Mean | Error |
---|---|---|---|---|
2017 | 1 | 1 | 0.326 ms | 0.001 ms |
2017 | 1 | 2 | 9.657 ms | 0.096 ms |
2017 | 2 | 1 | 0.088 ms | 0.001 ms |
2017 | 2 | 2 | 1.071 ms | 0.018 ms |
2017 | 3 | 1 | 0.042 ms | 0.000 ms |
2017 | 3 | 2 | 0.394 ms | 0.007 ms |
2017 | 4 | 1 | 0.868 ms | 0.014 ms |
2017 | 4 | 2 | 2.120 ms | 0.019 ms |
2017 | 5 | 1 | 443.550 ms | 2.675 ms |
2017 | 5 | 2 | 943.922 ms | 14.924 ms |
2017 | 6 | 1 | 47.568 ms | 0.892 ms |
2017 | 6 | 2 | 47.945 ms | 0.642 ms |
2017 | 7 | 1 | 3.214 ms | 0.056 ms |
2017 | 7 | 2 | 5.939 ms | 0.112 ms |
2017 | 8 | 1 | 3.947 ms | 0.076 ms |
2017 | 8 | 2 | 4.003 ms | 0.057 ms |
2017 | 9 | 1 | 0.412 ms | 0.007 ms |
2017 | 9 | 2 | 0.410 ms | 0.006 ms |
2017 | 10 | 1 | 0.060 ms | 0.000 ms |
2017 | 10 | 2 | 2.074 ms | 0.024 ms |
2017 | 11 | 1 | 0.931 ms | 0.010 ms |
2017 | 11 | 2 | 0.938 ms | 0.014 ms |
2017 | 12 | 1 | 2.921 ms | 0.039 ms |
2017 | 12 | 2 | 13.805 ms | 0.066 ms |
2017 | 13 | 1 | 0.059 ms | 0.000 ms |
2017 | 13 | 2 | 58.984 ms | 0.466 ms |
2017 | 14 | 1 | 117.960 ms | 2.343 ms |
2017 | 14 | 2 | 184.753 ms | 3.593 ms |
2017 | 15 | 1 | 350.526 ms | 4.880 ms |
2017 | 15 | 2 | 332.052 ms | 4.451 ms |
2017 | 16 | 1 | 5.702 ms | 0.059 ms |
2017 | 16 | 2 | 119.930 ms | 2.142 ms |
2017 | 17 | 1 | 0.089 ms | 0.001 ms |
2017 | 17 | 2 | 382.093 ms | 4.440 ms |
2017 | 18 | 1 | 0.549 ms | 0.008 ms |
2017 | 18 | 2 | 58.231 ms | 0.216 ms |
2017 | 19 | 1 | 2.160 ms | 0.037 ms |
2017 | 19 | 2 | 2.127 ms | 0.017 ms |
2017 | 20 | 1 | 21.929 ms | 0.212 ms |
2017 | 20 | 2 | 48.150 ms | 0.528 ms |
2017 | 21 | 1 | 2.046 ms | 0.009 ms |
2017 | 21 | 2 | 981.160 ms | 0.003 ms |
2017 | 22 | 1 | 0.475 ms | 0.001 ms |
2017 | 22 | 2 | 439.691 ms | 2.255 ms |
2017 | 23 | 1 | 0.039 ms | 0.000 ms |
2017 | 23 | 2 | 0.161 ms | 0.002 ms |
2017 | 24 | 1 | 1141.155 ms | 16.134 ms |
2017 | 24 | 2 | 1160.779 ms | 6.890 ms |
2017 | 25 | 1 | 649.455 ms | 6.828 ms |
2017 | 25 | 2 | 0.150 ms | 0.001 ms |
2018 | 1 | 1 | 0.180 ms | 0.000 ms |
2018 | 1 | 2 | 0.866 ms | 0.003 ms |
2018 | 2 | 1 | 1.116 ms | 0.005 ms |
2018 | 2 | 2 | 4.190 ms | 0.033 ms |
2018 | 3 | 1 | 10.471 ms | 0.179 ms |
2018 | 3 | 2 | 21.626 ms | 0.238 ms |
2018 | 4 | 1 | 1.095 ms | 0.021 ms |
2018 | 4 | 2 | 1.492 ms | 0.028 ms |
2018 | 5 | 1 | 1.680 ms | 0.024 ms |
2018 | 5 | 2 | 11.625 ms | 0.083 ms |
2018 | 6 | 1 | 415.256 ms | 8.477 ms |
2018 | 6 | 2 | 1.636 ms | 0.023 ms |
2018 | 7 | 1 | 0.466 ms | 0.003 ms |
2018 | 7 | 2 | 0.478 ms | 0.005 ms |
2018 | 8 | 1 | 3.249 ms | 0.047 ms |
2018 | 8 | 2 | 3.379 ms | 0.064 ms |
2018 | 9 | 1 | 10.204 ms | 0.199 ms |
2018 | 9 | 2 | 3113.392 ms | 60.781 ms |
2018 | 10 | 1 | 2.225 ms | 0.031 ms |
2018 | 10 | 2 | 2.235 ms | 0.038 ms |
2018 | 11 | 1 | 7.605 ms | 0.060 ms |
2018 | 11 | 2 | 263.781 ms | 5.079 ms |
2018 | 12 | 1 | 0.431 ms | 0.005 ms |
2018 | 12 | 2 | 2.852 ms | 0.036 ms |
2018 | 13 | 1 | 4.926 ms | 0.088 ms |
2018 | 13 | 2 | 51.958 ms | 0.760 ms |
2018 | 14 | 1 | 19.624 ms | 0.389 ms |
2018 | 14 | 2 | 9363.943 ms | 181.279 ms |
2018 | 15 | 1 | 1145.360 ms | 17.523 ms |
2018 | 15 | 2 | 2266.013 ms | 44.537 ms |
2018 | 16 | 1 | 13.443 ms | 0.080 ms |
2018 | 16 | 2 | 7.382 ms | 0.029 ms |
2018 | 17 | 1 | 270.516 ms | 2.039 ms |
2018 | 17 | 2 | 262.064 ms | 0.795 ms |
2018 | 18 | 1 | 6.584 ms | 0.037 ms |
2018 | 18 | 2 | 378.979 ms | 4.312 ms |
2018 | 19 | 1 | 0.045 ms | 0.000 ms |
2018 | 19 | 2 | 0.067 ms | 0.000 ms |
2018 | 20 | 1 | 32.281 ms | 0.110 ms |
2018 | 20 | 2 | 33.104 ms | 0.195 ms |
2018 | 21 | 1 | 0.037 ms | 0.002 ms |
2018 | 21 | 2 | 8.910 ms | 0.033 ms |
2018 | 22 | 1 | 1.172 ms | 0.003 ms |
2018 | 22 | 2 | 1874.915 ms | 4.790 ms |
2018 | 23 | 1 | 1.185 ms | 0.006 ms |
2018 | 23 | 2 | 17.935 ms | 0.738 ms |
2018 | 24 | 1 | 18.375 ms | 0.099 ms |
2018 | 24 | 2 | 1018.095 ms | 2.959 ms |
2018 | 25 | 1 | 73.515 ms | 0.291 ms |
2018 | 25 | 2 | 0.027 ms | 0.000 ms |