🎄 My Advent of Code solutions in Rust. http://adventofcode.com/2022

Overview

Advent of Code 2022 in Rust

My Advent of Code 2022 solutions in the Rust programming language. This repository holds a separate Rust project for each day and part.

I attempt to develop a standalone, elegant, compact and fast solution for each problem (two each day).

Previous year I did the same, solving everything in under a second:

Timings

Here is how long each solution runs. All solutions are measured (non scientifically) in bench.rs on an AMD Ryzen 9 5900X (24) @ 3.7GHz machine running Linux.

part A part B
day 1 0.027 ms 0.031 ms
day 2 0.006 ms 0.006 ms
day 3 0.015 ms 0.016 ms
day 4 0.040 ms 0.039 ms
day 5 0.020 ms 0.019 ms
day 6 0.001 ms 720 ns
day 7 0.008 ms 0.011 ms
day 8 0.045 ms 0.177 ms
day 9 0.120 ms 0.290 ms
day 10 0.001 ms 0.003 ms
day 11 0.019 ms 5.72 ms
day 12 0.294 ms 51.22 ms
day 13 0.238 ms 0.277 ms
day 14 0.226 ms 6.14 ms
day 15 0.003 ms 16.19 ms
one-by-one (1 CPU core) parallel
everything 81.32 ms 51.86 ms

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 1a, and run it
cd day01a
cargo +nightly run --release

# or run everything in parallel
cd ../runner
cargo +nightly run --release --bin runner-par

# or benchmark every day
cd ../runner
cargo +nightly run --release --bin bench

Some solutions require Rust Nightly, that's why +nightly is included.

Other years

License

This project is released under the GNU GPL-3.0 license. Check out the LICENSE file for more information.

You might also like...
Advent of Code 2022 in Rust 🦀

Advent of Code 2022 in Rust 🦀

My try at Advent of Code 2022 in Rust.

Advent of Code 2022 My solutions to Advent of Code 2022, written in Rust. I love seeing the variety of solution other people come up with, so I decide

I will be attempting Advent of Code 2022 with Rust, a language I have never learned before.

Advent of Code 2022 This year, I will be attempting Advent of Code with Rust, a language I have never learned before. I will also be taking some notes

Advent of Code 2022 - in Rust!

Advent of Code 2022 My solutions to problems in 2022 edition of Advent of Code, written in Rust. How to use this repo: The best way to see how solutio

🎄 Advent of Code written in various languages. (2015-2022)

🎄 Advent of Code This repository contains my solutions to the Advent of Code puzzles. Every year, I will try to solve the puzzles in a different lang

Trying to solve Advent of Code 2022 in 25 different languages (1 day = 1 language)

Advent of Code 2022: 15/25 langs I’ll try to solve this Advent of Code using different language for each day. Any programs needed to run the code will

Advent of Code 2022 - my answers

Advent of Code 2022 my answers Development occurs in language-specific directories: Haskell Kotlin Python Rust Day1.hs Day1.kt day1.py day1.rs Day2.hs

Advent of Code 2021 puzzles & solutions in Rust

Advent of Code 2021 These are puzzles for the Advent of Code 2021 challenge, written and solved in the Rust programming language. The puzzle for each

My solutions to Advent of Code 2021 (mostly in rust)

Advent of Code 2021 Small code to solve problems at https://adventofcode.com/2021. Most of the code are written in Rust. How to run solutions For exam

Owner
Tim Visée
On GitLab: https://gitlab.com/timvisee
Tim Visée
My solutions for Advent of Code 2022, written in Rust

Template largely copied from RikvanToor/aoc-rust-template, upgraded for clap v4. This template can be forked/cloned from beeb/aoc-rust. Usage First, f

Valentin Bersier 2 Dec 15, 2022
🦀 Rust solutions for Advent of Code 2022

?? Advent of Code 2022 Solutions for Advent of Code in Rust. 2022 Results Day Part 1 Part 2 Day 1 ⭐ ⭐ Day 2 ⭐ ⭐ Day 3 ⭐ ⭐ Day 4 ⭐ ⭐ Day 5 ⭐ ⭐ Day 6 ⭐

Felix Spöttel 10 Dec 28, 2022
Solutions to Advent of Code 2022 in Rust  🦀

AdventOfCode2022 ?? Solutions to AoC 2022 in Rust ?? Usage cargo run --release --bin DAY # run a specific day cargo run --release # run all

Axel Lindeberg 32 Jan 5, 2023
My Advent of Code 2022 solutions, in Rust.

AoC 2022 My solutions for the 2022 edition of Advent of Code in Rust. Simply run cargo run --release --bin dayXX to solve. Some days require z3, insta

Orson Peters 6 Jan 26, 2023
🎄 My solutions to Advent of Code 2022.

?? advent-of-code-2022 Overview This repository contains my solutions to Advent of Code 2022. I decided to take this year as an opportunity to learn R

Vighnesh Shenoy 3 Dec 15, 2022
Solutions to Advent of Code 2022 puzzles

Solutions to Advent of Code 2022 puzzles

null 3 Dec 15, 2022
Here are my Advent of Code solutions for 2022.

advent-of-code-2022 This repository contains my Advent of Code solutions for 2022. I am doing them in Ruby, Crystal, and Rust, and as I release each d

Kirk Haines 4 Dec 31, 2022
Code and Development environment for adventofcode.com - 2022 edition

aoc-2022 Warning Spoiler Alert! If you want to solve the aoc problems on your own, do not read any further. This repository contains solutions for the

docToolchain 8 Dec 26, 2022
https://adventofcode.com/2022/

Advent of Code 2022 This repository contains my solutions for Advent of Code 2022. Goal is readable, simple and mostly clean. Each day is solved in it

Guillaume P. 3 Dec 15, 2022
Advent of Code 2022 (Rust)

Advent of Code 2022 ?? | -+- A /=\ /\ /\ ___ _ __ _ __ __ __ i/ O \i / \/

Dominik Harmim 2 Dec 15, 2022