🎅 🎄 ⛄ ✨
Advent of Code 2020 Advent of Code using TypeScript.
There's no need to build anything. Source files are transpiled and cached on-the-fly using esbuild-runner with pretty much zero overhead. Running the code for a certain day, will:
- download the input if needed
- test any examples for each part
- test the answer (if availble) for each part
- measure the performance and update the benchmark section of this readme
⚡ Benchmark
My personal goal for this year is to solve all puzzles within 25ms total, so an average of 1ms per puzzle.
edit: never mind
😂
❄️ 2020
2020 | Part1 | Part2 | Total | Days Total | Stars |
---|---|---|---|---|---|
Day 1 | 12µs | 196µs | 208µs | ||
Day 2 | 320µs | 175µs | 703µs | ||
Day 3 | 3µs | 15µs | 721µs | ||
Day 4 | 302µs | 429µs | 1.45ms | ||
Day 5 | 362µs | 356µs | 2.17ms | ||
Day 6 | 131µs | 143µs | 2.44ms | ||
Day 7 | 573µs | 392µs | 3.41ms | ||
Day 8 | 100µs | 144µs | 3.65ms | ||
Day 9 | 93µs | 47µs | 3.79ms | ||
Day 10 | 14µs | 23µs | 3.83ms | ||
Day 11 | 32.43ms | 55.86ms | 92.12ms | ||
Day 12 | 23µs | 26µs | 92.17ms | ||
Day 13 | 4µs | 19µs | 92.19ms | ||
Day 14 | 632µs | 6.97ms | 99.79ms | ||
Day 15 | 10µs | 683.67ms | 783.47ms | ||
Day 16 | 554µs | 1.26ms | 785.28ms | ||
Day 17 | 41.86ms | 1359.56ms | 2186.7ms | ||
Day 18 | 1.91ms | 1.91ms | 2190.52ms | ||
Day 19 | 425µs | 667µs | 2191.61ms |
❄️ 2019
2019 | Part1 | Part2 | Total | Days Total | Stars |
---|---|---|---|---|---|
Day 1 | 3µs | 10µs | 13µs | ||
Day 3 | 58.98ms | 114.56ms | 173.55ms | ||
Day 4 | 6.66ms | 6.29ms | 186.5ms |
❄️ 2015
2015 | Part1 | Part2 | Total | Days Total | Stars |
---|---|---|---|---|---|
Day 1 | 85µs | 9µs | 95µs | ||
Day 2 | 611µs | 785µs | 1.49ms | ||
Day 3 | 263µs | 282µs | 2.04ms | ||
Day 4 | 592.43ms | 18805.74ms | 19400.2ms | ||
Day 5 | 394µs | 703µs | 19401.3ms |
🚀 Usage
$ bin/aoc --help
Usage: aoc [options] [day]
--year [year] Defaults to 2020
--bench Benchmark the solutions for all days
--help|-h Display this help message
To run all days:
$ bin/aoc
To run a specific day:
$ bin/aoc 3
To run the benchmarks:
$ bin/aoc --bench
if a day has not been implemented yet, executing that day will create a new
src/day??.ts
file based on the template