Home

Awesome

🎄 Advent of Code 2023

license

ProblemSolutionExecution timeLines of codeFinished
Day 1Problem 1day01.rs61.209 µs + 463.01 µs37✓
Day 2Problem 2day02.rs95.278 µs + 92.764 µs46✓
Day 3Problem 3day03.rs598.86 µs + 541.84 µs51✓
Day 4Problem 4day04.rs337.20 µs + 326.75 µs48✓
Day 5Problem 5day05.rs61.339 µs + 113.32 µs92✓
Day 6Problem 6day06.rs537.83 ns + 5.8270 ms34✓
Day 7Problem 7day07.rs2.9551 ms + 2.8716 ms155✓
Day 8Problem 8day08.rs1.9298 ms + 10.211 ms72✓
Day 9Problem 9day09.rs572.13 µs + 565.22 µs49✓
Day 10Problem 10day10.rs637.60 µs + 3.2216 ms145✓
Day 11Problem 11day11.rs134.43 µs + 124.47 µs50✓

The benchmarks are measured (non-scientifically) with cargo-criterion on a AMD Ryzen 5 3600 Desktop. More in the benchmarks section. The lines of code are measured using ghloc, excluding comments and empty lines.

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-2023.git
cd advent-of-code-2023

Build

cargo build --release

Run

Run all

cargo run --release

Run a specific day

cargo run --release --bin day01

Benchmarks

Install Criterion

To run the benchmarks you need to install cargo-criterion first:

cargo install cargo-criterion

Run benchmarks

Once you have Criterion installed, you can run the benchmarks with:

cargo criterion