/advent-of-code-2021

Rust solutions of Advent of Code 2021

Primary LanguageRustMIT LicenseMIT

Advent of Code 2021

license

Problem Solution Execution time Finished
Day 1 Problem 1 day1.rs 26.920 μs + 26.927 μs
Day 2 Problem 2 day2.rs 25.295 μs + 29.425 μs
Day 3 Problem 3 day3.rs 53.085 μs + 496.60 μs
Day 4 Problem 4 day4.rs 418.32 μs + 1.8037 ms
Day 5 Problem 5 day5.rs 748.14 μs + 848.71 μs
Day 6 Problem 6 day6.rs 2.7375 μs + 2.8628 μs
Day 7 Problem 7 day7.rs 23.143 μs + 15.143 μs
Day 8 Problem 8 day8.rs 15.555 μs + 21.479 ms
Day 9 Problem 9 day9.rs 75.215 μs + 205.23 μs
Day 10 Problem 10 day10.rs 28.089 μs + 28.422 μs
Day 11 Problem 11 day11.rs 59.261 μs + 200.58 μs
Day 12 Problem 12 day12.rs 632.15 μs + 16.326 ms
Day 13
Day 14
Day 15
Day 16
Day 17
Day 18
Day 19
Day 20
Day 21
Day 22
Day 23
Day 24
Day 25

The benchmarks are measured (non-scientifically) with cargo-criterion on a Macbook Pro 13' M1.

Install Rust

If you don't have Rust installed (how dare you) just run this:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

If you are not using a Unix-like OS, check the instructions here

Usage

Clone

git clone https://github.com/MrRobb/advent-of-code-2021.git
cd advent-of-code-2021

Build

cargo build --release

Run

Run all

cargo run --release

Run a specific day

cargo run --release --bin day1