{"id":19553902,"url":"https://github.com/mandejan/advent-of-code","last_synced_at":"2025-04-19T17:29:58.116Z","repository":{"id":77512796,"uuid":"317581163","full_name":"ManDeJan/advent-of-code","owner":"ManDeJan","description":"Advent of Code solutions","archived":false,"fork":false,"pushed_at":"2024-12-03T21:42:29.000Z","size":489,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T19:21:46.965Z","etag":null,"topics":["advent-of-code","advent-of-code-2015","advent-of-code-2020","advent-of-code-2021","advent-of-code-2022","template","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ManDeJan.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-01T15:16:33.000Z","updated_at":"2024-12-03T21:42:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"71ed2d5f-c008-49bb-9015-fe82257a4184","html_url":"https://github.com/ManDeJan/advent-of-code","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/ManDeJan%2Fadvent-of-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManDeJan%2Fadvent-of-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManDeJan%2Fadvent-of-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManDeJan%2Fadvent-of-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ManDeJan","download_url":"https://codeload.github.com/ManDeJan/advent-of-code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249749696,"owners_count":21320013,"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-2015","advent-of-code-2020","advent-of-code-2021","advent-of-code-2022","template","zig"],"created_at":"2024-11-11T04:25:10.197Z","updated_at":"2025-04-19T17:29:58.079Z","avatar_url":"https://github.com/ManDeJan.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code solutions\n\nIn zig, cause we gotta go fast B)\nRun code with `zig build run -Doptimize=ReleaseFast`\n\n# Timings\n\nMeasurements are taken from an average of 100 runs on my Ryzen 5950x processor\n(~4.2GHz) I compile everything with -OReleaseFast\nEvery day is programmed as a function that receives a string and returns a pair\nof ints. This is what is measured, I decided not to include file I/O in the benchmarks because it causes a lot of variance and is not very interesting (imho) to optimize.\n\n## Results\n```\n┌─────────┐\n│Year 2015│\n├───┬─────┴──────────┬────────────────┬──────────────┐\n│Day│     Part 1     │     Part 2     │     Time     │\n│  1│             74 │           1795 │      3.590 μs│\n│  2│        1586300 │        3737498 │     45.780 μs│\n│  3│           2592 │           2360 │    314.540 μs│\n│  4│         117946 │        3938038 │ 371379.340 μs│\n│  5│            258 │             53 │    113.550 μs│\n└───┴────────────────┴──────┬─────────┼─────────── + ┤\n                            │Year time│ 371856.800 μs│\n                            └─────────┴──────────────┘\n┌─────────┐\n│Year 2016│\n├───┬─────┴──────────┬────────────────┬──────────────┐\n│Day│     Part 1     │     Part 2     │     Time     │\n│  1│            239 │            141 │      5.160 μs│\n└───┴────────────────┴──────┬─────────┼─────────── + ┤\n                            │Year time│      5.160 μs│\n                            └─────────┴──────────────┘\n┌─────────┐\n│Year 2020│\n├───┬─────┴──────────┬────────────────┬──────────────┐\n│Day│     Part 1     │     Part 2     │     Time     │\n│  1│         719796 │      144554112 │      2.600 μs│\n│  2│            460 │            251 │     16.530 μs│\n│  3│            265 │     3154761400 │      1.250 μs│\n│  4│            170 │            103 │     35.890 μs│\n│  5│            926 │            657 │      2.320 μs│\n│  6│           6596 │           3219 │     25.130 μs│\n│  7│            119 │         155802 │     41.620 μs│\n│  8│           2051 │           2304 │     32.890 μs│\n│  9│       85848519 │       13414198 │     45.410 μs│\n│ 10│           2400 │338510590509056 │      1.000 μs│\n└───┴────────────────┴──────┬─────────┼─────────── + ┤\n                            │Year time│    204.640 μs│\n                            └─────────┴──────────────┘\n┌─────────┐\n│Year 2021│\n├───┬─────┴──────────┬────────────────┬──────────────┐\n│Day│     Part 1     │     Part 2     │     Time     │\n│  1│           1387 │           1362 │     36.900 μs│\n│  2│        1488669 │     1176514794 │      5.260 μs│\n│  3│        3969000 │        4267809 │     97.190 μs│\n│  4│          49686 │          26878 │     88.490 μs│\n│  5│           9723 │          22116 │    137.990 μs│\n│  6│         388419 │  1740449478328 │      0.660 μs│\n│  7│         343605 │       96744904 │     23.100 μs│\n│  8│            284 │         973499 │     19.510 μs│\n│  9│            518 │              0 │      2.940 μs│\n└───┴────────────────┴──────┬─────────┼─────────── + ┤\n                            │Year time│    412.040 μs│\n                            └─────────┴──────────────┘\n┌─────────┐\n│Year 2022│\n├───┬─────┴──────────┬────────────────┬──────────────┐\n│Day│     Part 1     │     Part 2     │     Time     │\n│  1│          74711 │         209481 │     31.660 μs│\n│  2│          11063 │          10349 │      2.500 μs│\n│  3│           7737 │           2697 │     24.000 μs│\n│  5│      HBTMTBSDC │      PQTJRSHWS │     25.430 μs│\n│  6│           1042 │           2980 │      3.560 μs│\n│  7│        1477771 │        3579501 │     17.320 μs│\n│  9│           6284 │           2661 │    413.440 μs│\n│ 10│          12880 │       FCJAPJRE │      1.080 μs│\n│ 11│         110220 │    19457438264 │   2587.290 μs│\n│ 12│            481 │            480 │     21.760 μs│\n└───┴────────────────┴──────┬─────────┼─────────── + ┤\n                            │Year time│   3128.040 μs│\n                            └─────────┴──────────────┘\n┌─────────┐\n│Year 2023│\n├───┬─────┴──────────┬────────────────┬──────────────┐\n│Day│     Part 1     │     Part 2     │     Time     │\n│  1│          54239 │          55524 │     44.530 μs│\n│  2│           2268 │          63542 │     14.850 μs│\n│  3│         528819 │       80403602 │     85.880 μs│\n│  4│          21105 │        5329815 │      2.600 μs│\n│  6│         503424 │       32607562 │      0.170 μs│\n│  7│      250602641 │      251037509 │     49.070 μs│\n└───┴────────────────┴──────┬─────────┼─────────── + ┤\n                            │Year time│    197.100 μs│\n                            └─────────┴──────────────┘\n┌─────────┐\n│Year 2024│\n├───┬─────┴──────────┬────────────────┬──────────────┐\n│Day│     Part 1     │     Part 2     │     Time     │\n│  1│        1722302 │       20373490 │     38.833 μs│\n│  2│            332 │            398 │     54.226 μs│\n│  3│      153469856 │       77055967 │     20.955 μs│\n└───┴────────────────┴──────┬─────────┼─────────── + ┤\n                            │Year time│    114.014 μs│\n                            └─────────┴──────────────┘\n```\n\n\u003c!-- Total time: 375803.780 μs --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmandejan%2Fadvent-of-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmandejan%2Fadvent-of-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmandejan%2Fadvent-of-code/lists"}