{"id":20390445,"url":"https://github.com/timvisee/advent-of-code-2020","last_synced_at":"2025-04-06T05:16:19.815Z","repository":{"id":66230084,"uuid":"317510745","full_name":"timvisee/advent-of-code-2020","owner":"timvisee","description":":christmas_tree: My Advent of Code solutions in Rust. http://adventofcode.com/2020","archived":false,"fork":false,"pushed_at":"2024-12-01T10:21:54.000Z","size":392,"stargazers_count":120,"open_issues_count":2,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T03:11:04.054Z","etag":null,"topics":["advent-of-code","advent-of-code-2020","aoc","aoc2020","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":"2020-12-01T10:50:26.000Z","updated_at":"2024-12-01T10:21:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"47b3335e-4bd4-4b85-8855-201e74463be7","html_url":"https://github.com/timvisee/advent-of-code-2020","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-2020","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timvisee%2Fadvent-of-code-2020/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timvisee%2Fadvent-of-code-2020/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timvisee%2Fadvent-of-code-2020/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timvisee","download_url":"https://codeload.github.com/timvisee/advent-of-code-2020/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247436286,"owners_count":20938533,"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-2020","aoc","aoc2020","rust"],"created_at":"2024-11-15T03:24:56.455Z","updated_at":"2025-04-06T05:16:19.794Z","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 2020 in Rust\nMy [Advent of Code 2020][aoc-2020] solutions in the Rust programming language.\nThis repository holds a separate Rust project for each day and part.\n\nThis year I attempt to develop a standalone, short, compact and fast solution\nfor each problem (day part).\n\nI've written an article about my solutions here:\nhttps://timvisee.com/blog/solving-aoc-2020-in-under-a-second/\n\n## Timings\nHere is how long each solution takes to run to completion.\nAll solutions are measured (non scientifically) with [`hyperfine`][hyperfine] on\na `i5-4670k @ 3.8Ghz` machine running Linux.\nTimings include binary loading, execution, input and output timings.\n\n![Benchmark](./res/graph.png)\n\n|                                                | part A                              | part B                              |\n|:-----------------------------------------------|:------------------------------------|:------------------------------------|\n| [day 1](https://adventofcode.com/2020/day/1)   | [`  0.170ms`](./day01a/src/main.rs) | [`  0.007ms`](./day01b/src/main.rs) |\n| [day 2](https://adventofcode.com/2020/day/2)   | [`  0.553ms`](./day02a/src/main.rs) | [`  0.069ms`](./day02b/src/main.rs) |\n| [day 3](https://adventofcode.com/2020/day/3)   | [`  0.009ms`](./day03a/src/main.rs) | [`  0.013ms`](./day03b/src/main.rs) |\n| [day 4](https://adventofcode.com/2020/day/4)   | [`  0.157ms`](./day04a/src/main.rs) | [`  0.185ms`](./day04b/src/main.rs) |\n| [day 5](https://adventofcode.com/2020/day/5)   | [`  0.004ms`](./day05a/src/main.rs) | [`  0.011ms`](./day05b/src/main.rs) |\n| [day 6](https://adventofcode.com/2020/day/6)   | [`  0.031ms`](./day06a/src/main.rs) | [`  0.056ms`](./day06b/src/main.rs) |\n| [day 7](https://adventofcode.com/2020/day/7)   | [`  0.002ms`](./day07a/src/main.rs) | [`  1.71 ms`](./day07b/src/main.rs) |\n| [day 8](https://adventofcode.com/2020/day/8)   | [`  0.022ms`](./day08a/src/main.rs) | [`  0.131ms`](./day08b/src/main.rs) |\n| [day 9](https://adventofcode.com/2020/day/9)   | [`  0.043ms`](./day09a/src/main.rs) | [`  0.025ms`](./day09b/src/main.rs) |\n| [day 10](https://adventofcode.com/2020/day/10) | [`  0.004ms`](./day10a/src/main.rs) | [`  0.005ms`](./day10b/src/main.rs) |\n| [day 11](https://adventofcode.com/2020/day/11) | [`  0.007ms`](./day11a/src/main.rs) | [`  6.56 ms`](./day11b/src/main.rs) |\n| [day 12](https://adventofcode.com/2020/day/12) | [`  0.011ms`](./day12a/src/main.rs) | [`  0.011ms`](./day12b/src/main.rs) |\n| [day 13](https://adventofcode.com/2020/day/13) | [`  0.002ms`](./day13a/src/main.rs) | [`  0.004ms`](./day13b/src/main.rs) |\n| [day 14](https://adventofcode.com/2020/day/14) | [`  0.276ms`](./day14a/src/main.rs) | [`  6.10 ms`](./day14b/src/main.rs) |\n| [day 15](https://adventofcode.com/2020/day/15) | [`  0.227ms`](./day15a/src/main.rs) | [`511    ms`](./day15b/src/main.rs) |\n| [day 16](https://adventofcode.com/2020/day/16) | [`  0.209ms`](./day16a/src/main.rs) | [`  0.526ms`](./day16b/src/main.rs) |\n| [day 17](https://adventofcode.com/2020/day/17) | [`  0.357ms`](./day17a/src/main.rs) | [`  7.98 ms`](./day17b/src/main.rs) |\n| [day 18](https://adventofcode.com/2020/day/18) | [`  0.246ms`](./day18a/src/main.rs) | [`  0.228ms`](./day18b/src/main.rs) |\n| [day 19](https://adventofcode.com/2020/day/19) | [`  0.364ms`](./day19a/src/main.rs) | [`  0.523ms`](./day19b/src/main.rs) |\n| [day 20](https://adventofcode.com/2020/day/20) | [`  0.111ms`](./day20a/src/main.rs) | [`  0.460ms`](./day20b/src/main.rs) |\n| [day 21](https://adventofcode.com/2020/day/21) | [`  0.464ms`](./day21a/src/main.rs) | [`  0.293ms`](./day21b/src/main.rs) |\n| [day 22](https://adventofcode.com/2020/day/22) | [`  0.003ms`](./day22a/src/main.rs) | [`  3.42 ms`](./day22b/src/main.rs) |\n| [day 23](https://adventofcode.com/2020/day/23) | [`  0.005ms`](./day23a/src/main.rs) | [`192    ms`](./day23b/src/main.rs) |\n| [day 24](https://adventofcode.com/2020/day/24) | [`  0.105ms`](./day24a/src/main.rs) | [` 43.2  ms`](./day24b/src/main.rs) |\n| [day 25](https://adventofcode.com/2020/day/25) | [` 27.9  ms`](./day25a/src/main.rs) |                                     |\n\n|              | one-by-one                             | parallel                                   |\n|:-------------|:---------------------------------------|:-------------------------------------------|\n| _everything_ | [`699ms`](./runner/src/bin/runner.rs)  | [`511ms`](./runner/src/bin/runner-par.rs)  |\n\n## Run solutions\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# One solution requires large stack size, set to allow unlimited size\nulimit -s unlimited\n\n# Switch to day 1a, and run it\ncd day01a\ncargo run --release\n\n# Or run everything in parallel\ncd ../runner\ncargo run --release --bin runner-par\n\n# Or benchmark every day\ncd ../runner\ncargo run --release --bin bench\n```\n\nSome solutions might require Rust Nightly.\n\n## Other years\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)\n- [2020](https://github.com/timvisee/advent-of-code-2020) _(current)_\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\nThis project is released under the GNU GPL-3.0 license.\nCheck out the [LICENSE](LICENSE) file for more information.\n\n[aoc-2020]: https://adventofcode.com/2020\n[hyperfine]: https://github.com/sharkdp/hyperfine\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimvisee%2Fadvent-of-code-2020","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimvisee%2Fadvent-of-code-2020","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimvisee%2Fadvent-of-code-2020/lists"}