{"id":20390439,"url":"https://github.com/timvisee/advent-of-code-2022","last_synced_at":"2025-04-05T08:06:41.041Z","repository":{"id":64844587,"uuid":"572905081","full_name":"timvisee/advent-of-code-2022","owner":"timvisee","description":"🎄 My Advent of Code solutions in Rust. http://adventofcode.com/2022","archived":false,"fork":false,"pushed_at":"2024-12-01T10:22:23.000Z","size":196,"stargazers_count":160,"open_issues_count":1,"forks_count":7,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-29T07:06:25.446Z","etag":null,"topics":["advent-of-code","advent-of-code-2022","aoc","aoc2022","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":"2022-12-01T09:30:30.000Z","updated_at":"2024-12-01T10:22:27.000Z","dependencies_parsed_at":"2024-11-15T03:25:55.116Z","dependency_job_id":"98bbdf66-01ad-43d9-b8a3-125fe483b5e8","html_url":"https://github.com/timvisee/advent-of-code-2022","commit_stats":{"total_commits":68,"total_committers":1,"mean_commits":68.0,"dds":0.0,"last_synced_commit":"719731a942c92e4e9816f3e9ae0e496779e13e4b"},"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-2022","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timvisee%2Fadvent-of-code-2022/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timvisee%2Fadvent-of-code-2022/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timvisee%2Fadvent-of-code-2022/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timvisee","download_url":"https://codeload.github.com/timvisee/advent-of-code-2022/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305934,"owners_count":20917208,"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-2022","aoc","aoc2022","rust"],"created_at":"2024-11-15T03:24:55.980Z","updated_at":"2025-04-05T08:06:41.012Z","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":[],"sub_categories":[],"readme":"# Advent of Code 2022 in Rust\n\nMy [Advent of Code 2022][aoc-2022] 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-2021\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/2022/day/1)   | [` 0.027 ms`](./day01a/src/main.rs) | [` 0.031 ms`](./day01b/src/main.rs) |\n| [day 2](https://adventofcode.com/2022/day/2)   | [` 0.006 ms`](./day02a/src/main.rs) | [` 0.006 ms`](./day02b/src/main.rs) |\n| [day 3](https://adventofcode.com/2022/day/3)   | [` 0.015 ms`](./day03a/src/main.rs) | [` 0.016 ms`](./day03b/src/main.rs) |\n| [day 4](https://adventofcode.com/2022/day/4)   | [` 0.040 ms`](./day04a/src/main.rs) | [` 0.039 ms`](./day04b/src/main.rs) |\n| [day 5](https://adventofcode.com/2022/day/5)   | [` 0.020 ms`](./day05a/src/main.rs) | [` 0.019 ms`](./day05b/src/main.rs) |\n| [day 6](https://adventofcode.com/2022/day/6)   | [` 0.001 ms`](./day06a/src/main.rs) | [`   550 ns`](./day06b/src/main.rs) |\n| [day 7](https://adventofcode.com/2022/day/7)   | [` 0.008 ms`](./day07a/src/main.rs) | [` 0.011 ms`](./day07b/src/main.rs) |\n| [day 8](https://adventofcode.com/2022/day/8)   | [` 0.045 ms`](./day08a/src/main.rs) | [` 0.177 ms`](./day08b/src/main.rs) |\n| [day 9](https://adventofcode.com/2022/day/9)   | [` 0.120 ms`](./day09a/src/main.rs) | [` 0.290 ms`](./day09b/src/main.rs) |\n| [day 10](https://adventofcode.com/2022/day/10)  | [` 0.001 ms`](./day10a/src/main.rs) | [` 0.003 ms`](./day10b/src/main.rs) |\n| [day 11](https://adventofcode.com/2022/day/11)  | [` 0.019 ms`](./day11a/src/main.rs) | [` 5.72  ms`](./day11b/src/main.rs) |\n| [day 12](https://adventofcode.com/2022/day/12)  | [` 0.294 ms`](./day12a/src/main.rs) | [`51.22  ms`](./day12b/src/main.rs) |\n| [day 13](https://adventofcode.com/2022/day/13)  | [` 0.238 ms`](./day13a/src/main.rs) | [` 0.277 ms`](./day13b/src/main.rs) |\n| [day 14](https://adventofcode.com/2022/day/14)  | [` 0.226 ms`](./day14a/src/main.rs) | [` 6.14  ms`](./day14b/src/main.rs) |\n| [day 15](https://adventofcode.com/2022/day/15)  | [` 0.003 ms`](./day15a/src/main.rs) | [`16.19  ms`](./day15b/src/main.rs) |\n\n|              | one-by-one (1 CPU core)                  | parallel                                     |\n|:-------------|:-----------------------------------------|:---------------------------------------------|\n| _everything_ | [`81.32 ms`](./runner/src/bin/runner.rs) | [`51.86 ms`](./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) _(current)_\n- [2021](https://github.com/timvisee/advent-of-code-2021)\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-2022]: https://adventofcode.com/2022\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimvisee%2Fadvent-of-code-2022","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimvisee%2Fadvent-of-code-2022","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimvisee%2Fadvent-of-code-2022/lists"}