-
profiling with hyperfine -
brew install hyperfine
:hyperfine -r 10 'python 2020/01.py'
python -m cProfile 2020/01.py
time python 2020/01.py
-
hyperfine --warmup 3 -r 10 'find 2020 -type f -regex ".*/[0-9]*\.py" | sort -n | xargs python ' | tee 2020/benchmark.txt
-
bin/run-all-solutions.py --dir 2020 --write
Day | Name | Solution | CI Benchmark |
---|---|---|---|
01 | Report Repair | py | |
02 | Password Philosophy | py | |
03 | Toboggan Trajectory | py | |
04 | Passport Processing | py | |
05 | Binary Boarding | py | |
06 | Custom Customs | py | |
07 | Handy Haversacks | py | |
08 | Handheld Halting | py | |
09 | Encoding Error | py | |
10 | Adapter Array | py | |
11 | Seating System | py | |
12 | Rain Risk | py | |
13 | Shuttle Search | py | |
14 | Docking Data | py | |
15 | Rambunctious Recitation | py | |
16 | Ticket Translation | py | |
17 | Conway Cubes | py** | |
18 | Operation Order | py | |
19 | Monster Messages | py* | |
20 | Jurassic Jigsaw | py** | |
21 | Allergen Assessment | py | |
22 | Crab Combat | py | |
23 | Crab Cups | py* | |
24 | Lobby Layout | py | |
25 | Combo Breaker | py | |
--- | ------ | --------- | --- |
all | AoC 20 | txt | M1 - 30.996 s, CI - |
- or ** - external solution adopted
download input of last day:
- install:
go install github.com/GreenLightning/advent-of-code-downloader/aocdl@latest
cp $(go env GOPATH)/bin/aocdl /usr/local/bin/
echo '{"session-cookie": "xxx"}' > $HOME/.aocdlconfig
echo "
#!/usr/bin/env bash
aocdl --force
pbcopy <input.txt
" > get.sh
chmod +x get.sh
- download to input.txt and copy to clipboard:
./get.sh
- https://github.com/sophiebits/adventofcode
- https://github.com/arknave/advent-of-code-2020
- Collection of external solutions
- 300 stars and visualizations
- rust under 1 second
- rust under 1 second #2
- https://github.com/narimiran/AdventOfCode2020
- https://github.com/mebeim/aoc/tree/master/2020 (walk-through)