My Advent of Code 2021 solutions in the Rust programming language. I try to develop an elegant, compact and fast solution using Idiomatic Rust.
# Run all the days
cargo run --release
#Run a specific day
cargo run --release --bin day01
cargo bench
Problem | Part 1 | Part 2 | |
---|---|---|---|
Day 1 | Problem 1 | 0.048 ms | 0.051 ms |
Day 2 | Problem 2 | 0.040 ms | 0.04l ms |
The benchmarks are measured with the unstable bench feature of Rust using my Macbook Pro 13' 2015