add point subpackage

build ShortestPath as ordered map

replace dijkstra in part two with a bfs
This commit is contained in:
2024-12-19 21:32:21 +00:00
parent 62665d4d10
commit 22b442171b
14 changed files with 111 additions and 105 deletions

View File

@@ -2,14 +2,14 @@ goos: linux
goarch: amd64
pkg: github.com/onyx-and-iris/aoc2024/day-18
cpu: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
BenchmarkSolve-12 1 3840363786 ns/op
BenchmarkSolve-12 1 3847307489 ns/op
BenchmarkSolve-12 1 3793560090 ns/op
BenchmarkSolve-12 1 3804761992 ns/op
BenchmarkSolve-12 1 3811796394 ns/op
BenchmarkSolve-12 1 3782742297 ns/op
BenchmarkSolve-12 1 3799861901 ns/op
BenchmarkSolve-12 1 3784385312 ns/op
BenchmarkSolve-12 1 3780708522 ns/op
BenchmarkSolve-12 1 3811926561 ns/op
ok github.com/onyx-and-iris/aoc2024/day-18 38.067s
BenchmarkSolve-12 1 1410266797 ns/op
BenchmarkSolve-12 1 1422531597 ns/op
BenchmarkSolve-12 1 1422451797 ns/op
BenchmarkSolve-12 1 1404297097 ns/op
BenchmarkSolve-12 1 1391816300 ns/op
BenchmarkSolve-12 1 1416344400 ns/op
BenchmarkSolve-12 1 1399980801 ns/op
BenchmarkSolve-12 1 1391180300 ns/op
BenchmarkSolve-12 1 1390386701 ns/op
BenchmarkSolve-12 1 1399453200 ns/op
ok github.com/onyx-and-iris/aoc2024/day-18 14.058s