Categorygithub.com/jcockbain/advent-of-code
repository
0.0.0-20221217193015-6146a25cac99
Repository: https://github.com/jcockbain/advent-of-code.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

🎄 advent-of-code 🎄

Go Go Report Card

Solutions to 2021 and 2022 Advent of code.

Summary

Advent of Code is an annual advent-calendar of programming puzzles. Here are my solutions in Golang.

Running the Code

To fetch the input, and create a template dir for each day:

./new_day {2022} {day1}

To then run the solutions:

// using 2022 day1 as an example
cd 2022/day01

// run the binary
go run main.go

// run tests
go test

// benchmark solution
go test --bench=BenchmarkMain

Runtimes

The results are found using a BenchmarkMain benchmark in each solution. This table is generated by running the benchmark.sh script.

DAY20212022
189.8µs233µs
2424µs568µs
3399µs821µs
49.21ms855µs
5447µs26.2ms
659.4µs333µs
7504µs29.5ms
82.16ms7.13ms
95.26ms1.9ms
101.08ms29µs
114.8ms19.9µs
12280ms247ms
131.31ms
14744µs86.3ms
151.36s
16239µs
172.05ms
18357ms
194.43s
20440ms
21728ms
224.42ms
231.19s
2415.2µs
251.56s
Totals10.4s346ms