All Projects â†’ timvisee â†’ advent-of-code-2021

timvisee / advent-of-code-2021

Licence: GPL-3.0 License
🎄 My Advent of Code solutions in Rust. http://adventofcode.com/2021

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to advent-of-code-2021

AoCHelper
Helper .NET library for solving Advent of Code puzzles
Stars: ✭ 22 (-87.28%)
Mutual labels:  advent-of-code, aoc, advent-of-code-2021, aoc2021
adventofcode
Advent of Code solutions 2015-2021
Stars: ✭ 95 (-45.09%)
Mutual labels:  advent-of-code, aoc, advent-of-code-2021, aoc2021
AdventOfCode2021
Solutions to all 25 AoC 2021 problems in Rust 🦀 Less than 100 lines per day and under 1 second total execution time. With competitive global leaderboard placements! 🎄
Stars: ✭ 34 (-80.35%)
Mutual labels:  advent-of-code, aoc, advent-of-code-2021, aoc2021
adventofcode-solver
🎄 Advent of Code (2015-2021) in JavaScript
Stars: ✭ 16 (-90.75%)
Mutual labels:  advent-of-code, aoc, advent-of-code-2021
AdventOfCode-Java
adventOfCode(Language.JAVA);
Stars: ✭ 15 (-91.33%)
Mutual labels:  advent-of-code, advent-of-code-2021
adventofcode-21
AdventOfCode 2021 solutions from the Devcord server
Stars: ✭ 12 (-93.06%)
Mutual labels:  advent-of-code, advent-of-code-2021
awesome-adventjs
🎅🎄 A collection of awesome resources related to the adventJS challenge https://adventjs.dev by @midudev
Stars: ✭ 45 (-73.99%)
Mutual labels:  advent-of-code, advent-of-code-2021
advent-of-code
My Advent of Code Solutions - 350/350 Stars
Stars: ✭ 30 (-82.66%)
Mutual labels:  advent-of-code, advent-of-code-2021
advent-of-code-2019
Advent of Code 2019 Submissions
Stars: ✭ 27 (-84.39%)
Mutual labels:  advent-of-code, aoc
adventofcode
🎄 Advent of Code (2015-2021) in C#
Stars: ✭ 114 (-34.1%)
Mutual labels:  advent-of-code, advent-of-code-2021
aoc2021
Advent of Code 2021 - my answers
Stars: ✭ 25 (-85.55%)
Mutual labels:  advent-of-code, advent-of-code-2021
advent-of-code
Solutions to the Advent of Code editions, mainly using Kotlin.
Stars: ✭ 14 (-91.91%)
Mutual labels:  aoc, aoc2021
AdventOfCode2021
My solutions to Advent of Code 2021
Stars: ✭ 15 (-91.33%)
Mutual labels:  advent-of-code, advent-of-code-2021
adventofcode-rb-2019
Solutions to http://adventofcode.com/2019 (complete)
Stars: ✭ 14 (-91.91%)
Mutual labels:  advent-of-code
advent2019
advent of code 2019
Stars: ✭ 24 (-86.13%)
Mutual labels:  advent-of-code
aoc
Advent of Code CLI for reading, running and submitting.
Stars: ✭ 30 (-82.66%)
Mutual labels:  advent-of-code
advent-2017
Advent of Code 2017
Stars: ✭ 16 (-90.75%)
Mutual labels:  advent-of-code
advent-of-cljc
Cross platform Clojure Advent of Code solutions
Stars: ✭ 44 (-74.57%)
Mutual labels:  advent-of-code
AdventOfCodeBase
Template repository for solving Advent of Code puzzles, which automatically handles input retrieval and output.
Stars: ✭ 33 (-80.92%)
Mutual labels:  advent-of-code
advent-of-code
My solutions for Advent of Code
Stars: ✭ 32 (-81.5%)
Mutual labels:  advent-of-code

Advent of Code 2021 in Rust

My Advent of Code 2021 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.025ms 0.024ms
day 2 0.024ms 0.025ms
day 3 0.021ms 0.023ms
day 4 0.075ms 0.106ms
day 5 0.110ms 0.220ms
day 6 0.0027ms 0.0028ms
day 7 0.013ms 0.013ms
day 8 0.008ms 0.026ms
day 9 0.012ms 0.036ms
day 10 0.011ms 0.015ms
day 11 0.019ms 0.039ms
day 12 0.015ms 0.272ms
day 13 0.038ms 0.044ms
day 14 0.007ms 0.008ms
day 15 1.05 ms 37.7 ms
day 16 0.002ms 0.007ms
day 17 0.0002ms 0.095ms
day 18 0.141ms 2.61 ms
day 19 1.03 ms 1.03 ms
day 20 0.042ms 3.10 ms
day 21 0.0008ms 0.016ms
day 22 0.083ms 1.74 ms
one-by-one (1 CPU core) parallel
everything 50.36 ms 39.53ms

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].