{"id":13595247,"url":"https://github.com/timvisee/advent-of-code-2021","last_synced_at":"2025-04-04T09:08:48.533Z","repository":{"id":42562684,"uuid":"433426660","full_name":"timvisee/advent-of-code-2021","owner":"timvisee","description":"🎄 My Advent of Code solutions in Rust. http://adventofcode.com/2021","archived":false,"fork":false,"pushed_at":"2024-12-01T10:22:09.000Z","size":244,"stargazers_count":239,"open_issues_count":1,"forks_count":17,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-28T08:07:38.098Z","etag":null,"topics":["advent-of-code","advent-of-code-2021","aoc","aoc2021","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timvisee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["timvisee"],"custom":["https://timvisee.com/donate"],"patreon":"timvisee","ko_fi":"timvisee"}},"created_at":"2021-11-30T12:42:16.000Z","updated_at":"2024-12-06T08:59:42.000Z","dependencies_parsed_at":"2024-01-14T08:09:46.667Z","dependency_job_id":"0a7f2c41-17a2-432b-a5d6-57c7ca9e95b8","html_url":"https://github.com/timvisee/advent-of-code-2021","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timvisee%2Fadvent-of-code-2021","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timvisee%2Fadvent-of-code-2021/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timvisee%2Fadvent-of-code-2021/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timvisee%2Fadvent-of-code-2021/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timvisee","download_url":"https://codeload.github.com/timvisee/advent-of-code-2021/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149501,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advent-of-code","advent-of-code-2021","aoc","aoc2021","rust"],"created_at":"2024-08-01T16:01:46.346Z","updated_at":"2025-04-04T09:08:48.516Z","avatar_url":"https://github.com/timvisee.png","language":"Rust","funding_links":["https://github.com/sponsors/timvisee","https://timvisee.com/donate","https://patreon.com/timvisee","https://ko-fi.com/timvisee"],"categories":["Rust"],"sub_categories":[],"readme":"# Advent of Code 2021 in Rust\n\nMy [Advent of Code 2021][aoc-2021] solutions in the Rust programming language.\nThis repository holds a separate Rust project for each day and part.\n\nI attempt to develop a standalone, elegant, compact and fast solution for each\nproblem (two each day).\n\nPrevious year I did the same, solving everything in under a second:\n\n- https://timvisee.com/blog/solving-aoc-2020-in-under-a-second/\n- https://github.com/timvisee/advent-of-code-2020\n\n## Timings\n\nHere is how long each solution runs. All solutions are measured (non\nscientifically) in [`bench.rs`](./runner/src/bin/bench.rs) on an\n`AMD Ryzen 9 5900X (24) @ 3.7GHz` machine running Linux.\n\n|                                                | part A                              | part B                              |\n|:-----------------------------------------------|:------------------------------------|:------------------------------------|\n| [day 1](https://adventofcode.com/2021/day/1)   | [`  0.025ms`](./day01a/src/main.rs) | [`  0.024ms`](./day01b/src/main.rs) |\n| [day 2](https://adventofcode.com/2021/day/2)   | [`  0.024ms`](./day02a/src/main.rs) | [`  0.025ms`](./day02b/src/main.rs) |\n| [day 3](https://adventofcode.com/2021/day/3)   | [`  0.021ms`](./day03a/src/main.rs) | [`  0.023ms`](./day03b/src/main.rs) |\n| [day 4](https://adventofcode.com/2021/day/4)   | [`  0.075ms`](./day04a/src/main.rs) | [`  0.106ms`](./day04b/src/main.rs) |\n| [day 5](https://adventofcode.com/2021/day/5)   | [`  0.110ms`](./day05a/src/main.rs) | [`  0.220ms`](./day05b/src/main.rs) |\n| [day 6](https://adventofcode.com/2021/day/6)   | [` 0.0027ms`](./day06a/src/main.rs) | [` 0.0028ms`](./day06b/src/main.rs) |\n| [day 7](https://adventofcode.com/2021/day/7)   | [`  0.013ms`](./day07a/src/main.rs) | [`  0.013ms`](./day07b/src/main.rs) |\n| [day 8](https://adventofcode.com/2021/day/8)   | [`  0.008ms`](./day08a/src/main.rs) | [`  0.026ms`](./day08b/src/main.rs) |\n| [day 9](https://adventofcode.com/2021/day/9)   | [`  0.012ms`](./day09a/src/main.rs) | [`  0.036ms`](./day09b/src/main.rs) |\n| [day 10](https://adventofcode.com/2021/day/10) | [`  0.011ms`](./day10a/src/main.rs) | [`  0.015ms`](./day10b/src/main.rs) |\n| [day 11](https://adventofcode.com/2021/day/11) | [`  0.019ms`](./day11a/src/main.rs) | [`  0.039ms`](./day11b/src/main.rs) |\n| [day 12](https://adventofcode.com/2021/day/12) | [`  0.015ms`](./day12a/src/main.rs) | [`  0.272ms`](./day12b/src/main.rs) |\n| [day 13](https://adventofcode.com/2021/day/13) | [`  0.038ms`](./day13a/src/main.rs) | [`  0.044ms`](./day13b/src/main.rs) |\n| [day 14](https://adventofcode.com/2021/day/14) | [`  0.007ms`](./day14a/src/main.rs) | [`  0.008ms`](./day14b/src/main.rs) |\n| [day 15](https://adventofcode.com/2021/day/15) | [`  1.05 ms`](./day15a/src/main.rs) | [` 37.7  ms`](./day15b/src/main.rs) |\n| [day 16](https://adventofcode.com/2021/day/16) | [`  0.002ms`](./day16a/src/main.rs) | [`  0.007ms`](./day16b/src/main.rs) |\n| [day 17](https://adventofcode.com/2021/day/17) | [` 0.0002ms`](./day17a/src/main.rs) | [`  0.095ms`](./day17b/src/main.rs) |\n| [day 18](https://adventofcode.com/2021/day/18) | [`  0.141ms`](./day18a/src/main.rs) | [`  2.61 ms`](./day18b/src/main.rs) |\n| [day 19](https://adventofcode.com/2021/day/19) | [`  1.03 ms`](./day19a/src/main.rs) | [`  1.03 ms`](./day19b/src/main.rs) |\n| [day 20](https://adventofcode.com/2021/day/20) | [`  0.042ms`](./day20a/src/main.rs) | [`  3.10 ms`](./day20b/src/main.rs) |\n| [day 21](https://adventofcode.com/2021/day/21) | [` 0.0008ms`](./day21a/src/main.rs) | [`  0.016ms`](./day21b/src/main.rs) |\n| [day 22](https://adventofcode.com/2021/day/22) | [`  0.083ms`](./day22a/src/main.rs) | [`  1.74 ms`](./day22b/src/main.rs) |\n\n|              | one-by-one (1 CPU core)                  | parallel                                     |\n|:-------------|:-----------------------------------------|:---------------------------------------------|\n| _everything_ | [`50.36 ms`](./runner/src/bin/runner.rs) | [`39.53ms`](./runner/src/bin/runner-par.rs)  |\n\n## Run solutions\n\nEach Rust project contains a `input.txt` file, holding the puzzle input. Simply\nrun the project to see the solution appear.\n\n```bash\n# Switch to day 1a, and run it\ncd day01a\ncargo +nightly run --release\n\n# or run everything in parallel\ncd ../runner\ncargo +nightly run --release --bin runner-par\n\n# or benchmark every day\ncd ../runner\ncargo +nightly run --release --bin bench\n```\n\nSome solutions require Rust Nightly, that's why `+nightly` is included.\n\n## Other years\n\n- [2024](https://github.com/timvisee/advent-of-code-2024)\n- [2023](https://github.com/timvisee/advent-of-code-2023)\n- [2022](https://github.com/timvisee/advent-of-code-2022)\n- [2021](https://github.com/timvisee/advent-of-code-2021) _(current)_\n- [2020](https://github.com/timvisee/advent-of-code-2020)\n- [2019](https://github.com/timvisee/advent-of-code-2019)\n- [2018](https://github.com/timvisee/advent-of-code-2018)\n- [2017](https://github.com/timvisee/advent-of-code-2017)\n\n## License\n\nThis project is released under the GNU GPL-3.0 license.\nCheck out the [LICENSE](LICENSE) file for more information.\n\n[aoc-2021]: https://adventofcode.com/2021\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimvisee%2Fadvent-of-code-2021","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimvisee%2Fadvent-of-code-2021","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimvisee%2Fadvent-of-code-2021/lists"}