My Advent of Code 2020 solutions in the Rust programming language. This repository holds a separate Rust project for each day and part.
This year I attempt to develop a short, compact and fast solution for each problem.
Here is how long each solution takes to run to completion.
All solutions are measured (non scientifically) with hyperfine
on
a i5-4670k @ 3.8Ghz
machine running Linux.
Timings include binary execution, input reading and result printing delays.
part A | part B | |
---|---|---|
day 1 | 0.4ms |
0.3ms |
day 2 | 1.2ms |
0.2ms |
day 3 | 0.4ms |
0.4ms |
day 4 | 0.7ms |
0.7ms |
day 5 | 0.3ms |
0.3ms |
day 6 | 0.4ms |
0.4ms |
Each Rust project contains a input.txt
file, holding the puzzle input. Simply
run the project to see the solution appear.
# Switch to day 1a, and run it
cd day01a
cargo run --release
Some solutions might require Rust Nightly.
This project is released under the GNU GPL-3.0 license. Check out the LICENSE file for more information.