{"id":19205278,"url":"https://github.com/folke/adventofcode","last_synced_at":"2026-06-16T03:32:20.715Z","repository":{"id":66334873,"uuid":"317593492","full_name":"folke/adventofcode","owner":"folke","description":"🎅 🎄 ⛄ ✨ Solutions for Advent of Code 2020 in TypeScript","archived":false,"fork":false,"pushed_at":"2020-12-19T09:56:37.000Z","size":858,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T04:19:25.774Z","etag":null,"topics":["advent","advent-of-code","advent-of-code-2020","aoc","aoc2020","benchmark","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/folke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2020-12-01T16:00:41.000Z","updated_at":"2025-05-17T06:23:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"757f27b5-5ab1-4dd3-bc4d-3ff37217f978","html_url":"https://github.com/folke/adventofcode","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/folke/adventofcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folke%2Fadventofcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folke%2Fadventofcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folke%2Fadventofcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folke%2Fadventofcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/folke","download_url":"https://codeload.github.com/folke/adventofcode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folke%2Fadventofcode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34390052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","advent-of-code","advent-of-code-2020","aoc","aoc2020","benchmark","typescript"],"created_at":"2024-11-09T13:12:09.030Z","updated_at":"2026-06-16T03:32:20.700Z","avatar_url":"https://github.com/folke.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code 2020 :santa: :christmas_tree: :snowman: :sparkles: \n\n[Advent of Code](https://adventofcode.com/) using TypeScript.\n\nThere's no need to *build* anything. Source files are transpiled and cached on-the-fly using [esbuild-runner](https://github.com/folke/esbuild-runner/) with pretty much **zero overhead**. Running the code for a certain day, will:\n\n* download the input if needed\n* test any examples for each part\n* test the answer (if availble) for each part\n* measure the performance and update the benchmark section of this readme\n\n## :zap: Benchmark\n\n~~My personal goal for this year is to solve all puzzles within **25ms** total, so an average of **1ms** per puzzle.~~\n\u003e **edit:** never mind 😂\n\n\u003c!-- RESULTS:BEGIN --\u003e\n### :snowflake: 2020\n|[2020](./src/2020) | Part1 | Part2 | Total | Days Total | Stars|\n|--- | --- | --- | --- | --- | ---|\n|[Day 1](./src/2020/day1.ts) | 12µs | 196µs | ⚡️ 208µs | 208µs | :star: :star: |\n|[Day 2](./src/2020/day2.ts) | 320µs | 175µs | ⚡️ 496µs | 703µs | :star: :star: |\n|[Day 3](./src/2020/day3.ts) | 3µs | 15µs | ⚡️ 18µs | 721µs | :star: :star: |\n|[Day 4](./src/2020/day4.ts) | 302µs | 429µs | ⚡️ 730µs | 1.45ms | :star: :star: |\n|[Day 5](./src/2020/day5.ts) | 362µs | 356µs | ⚡️ 718µs | 2.17ms | :star: :star: |\n|[Day 6](./src/2020/day6.ts) | 131µs | 143µs | ⚡️ 274µs | 2.44ms | :star: :star: |\n|[Day 7](./src/2020/day7.ts) | 573µs | 392µs | ⚡️ 965µs | 3.41ms | :star: :star: |\n|[Day 8](./src/2020/day8.ts) | 100µs | 144µs | ⚡️ 244µs | 3.65ms | :star: :star: |\n|[Day 9](./src/2020/day9.ts) | 93µs | 47µs | ⚡️ 141µs | 3.79ms | :star: :star: |\n|[Day 10](./src/2020/day10.ts) | 14µs | 23µs | ⚡️ 37µs | 3.83ms | :star: :star: |\n|[Day 11](./src/2020/day11.ts) | 32.43ms | 55.86ms | ❗️ 88.29ms | 92.12ms | :star: :star: |\n|[Day 12](./src/2020/day12.ts) | 23µs | 26µs | ⚡️ 50µs | 92.17ms | :star: :star: |\n|[Day 13](./src/2020/day13.ts) | 4µs | 19µs | ⚡️ 23µs | 92.19ms | :star: :star: |\n|[Day 14](./src/2020/day14.ts) | 632µs | 6.97ms | ❗️ 7.6ms | 99.79ms | :star: :star: |\n|[Day 15](./src/2020/day15.ts) | 10µs | 683.67ms | ❗️ 683.67ms | 783.47ms | :star: :star: |\n|[Day 16](./src/2020/day16.ts) | 554µs | 1.26ms | ❗️ 1.81ms | 785.28ms | :star: :star: |\n|[Day 17](./src/2020/day17.ts) | 41.86ms | 1359.56ms | ❗️ 1401.42ms | 2186.7ms | :star: :star: |\n|[Day 18](./src/2020/day18.ts) | 1.91ms | 1.91ms | ❗️ 3.82ms | 2190.52ms | :star: :star: |\n|[Day 19](./src/2020/day19.ts) | 425µs | 667µs | ❗️ 1.09ms | 2191.61ms | :star: :star: |\n\n### :snowflake: 2019\n|[2019](./src/2019) | Part1 | Part2 | Total | Days Total | Stars|\n|--- | --- | --- | --- | --- | ---|\n|[Day 1](./src/2019/day1.ts) | 3µs | 10µs | ⚡️ 13µs | 13µs | :star: :star: |\n|[Day 3](./src/2019/day3.ts) | 58.98ms | 114.56ms | ❗️ 173.54ms | 173.55ms | :star: :star: |\n|[Day 4](./src/2019/day4.ts) | 6.66ms | 6.29ms | ❗️ 12.95ms | 186.5ms | :star: :star: |\n\n### :snowflake: 2015\n|[2015](./src/2015) | Part1 | Part2 | Total | Days Total | Stars|\n|--- | --- | --- | --- | --- | ---|\n|[Day 1](./src/2015/day1.ts) | 85µs | 9µs | ⚡️ 95µs | 95µs | :star: :star: |\n|[Day 2](./src/2015/day2.ts) | 611µs | 785µs | ❗️ 1.4ms | 1.49ms | :star: :star: |\n|[Day 3](./src/2015/day3.ts) | 263µs | 282µs | ⚡️ 545µs | 2.04ms | :star: :star: |\n|[Day 4](./src/2015/day4.ts) | 592.43ms | 18805.74ms | ❗️ 19398.16ms | 19400.2ms | :star: :star: |\n|[Day 5](./src/2015/day5.ts) | 394µs | 703µs | ❗️ 1.1ms | 19401.3ms | :star: :star: |\n\u003c!-- RESULTS:END --\u003e\n\n## :rocket: Usage\n\n```shell\n$ bin/aoc --help\nUsage: aoc [options] [day]\n\n  --year [year] Defaults to 2020       \n  --bench       Benchmark the solutions for all days\n  --help|-h     Display this help message\n```\n\nTo run all days:\n\n```shell\n$ bin/aoc\n```\n\nTo run a specific day:\n\n```shell\n$ bin/aoc 3\n```\n\nTo run the benchmarks:\n\n```shell\n$ bin/aoc --bench\n```\n\n\u003e if a day has not been implemented yet, executing that day will create a new `src/day??.ts` file based on the [template](src/day.template.ts)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolke%2Fadventofcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffolke%2Fadventofcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolke%2Fadventofcode/lists"}