advent-of-code-2019
advent-of-code-2019 copied to clipboard
:christmas_tree: My Advent of Code solutions in Rust. http://adventofcode.com/2019
Advent of Code 2019 in Rust
My Advent of Code 2019 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.
Timings
Here is how long each solution takes to run to completion.
All solutions are measured (non scientifically) with hyperfine on
a i5-4670k @ 3.9Ghz machine running Linux.
Timings include binary execution, input reading and result printing delays.
| part A | part B | |
|---|---|---|
| day 1 | 0.2ms |
0.2ms |
| day 2 | 0.2ms |
1.1ms |
| day 3 | 0.4ms |
0.5ms |
| day 4 | 0.9ms |
1.1ms |
| day 5 | 0.2ms |
0.2ms |
| day 6 | 6.9ms |
0.6ms |
| day 7 | 0.7ms |
1.7ms |
| day 8 | 0.1ms |
0.2ms |
| day 9 | 0.2ms |
9.2ms |
| day 10 | 2.4ms |
2.4ms |
| day 11 | 5.1ms |
1.1ms |
| day 12 | 0.6ms |
23.7ms |
| day 13 | 0.9ms |
23.1ms |
| day 16 | 3.1ms |
227ms |
Run solutions
Each Rust project contains a input.txt file, holding the puzzle input. Simply
run the project to see the solution appear.
# Switch to day 4a, and run it
cd day04a
cargo run --release
Some solutions might require Rust Nightly.
License
This project is released under the GNU GPL-3.0 license. Check out the LICENSE file for more information.