go-astar
go-astar copied to clipboard
Remove the 'close' and 'opened' fields.
Hi, beefsack. I think the closed and open fields are a bit of a contradiction, so I try to keep it simple. And I removed the head.Remove method, which gave a slight performance improvement.
Benchmark
Original
$ go test -benchmem -benchtime 3s -bench . astar
goos: windows
goarch: amd64
pkg: astar
cpu: Intel(R) Core(TM) i5-9600KF CPU @ 3.70GHz
BenchmarkLarge-6 2955 1188135 ns/op 542940 B/op 6652 allocs/op
PASS
ok astar 3.669s
After
$ go test -benchmem -benchtime 3s -bench . astar
oos: windows
goarch: amd64
pkg: astar
cpu: Intel(R) Core(TM) i5-9600KF CPU @ 3.70GHz
BenchmarkLarge-6 3030 1157325 ns/op 516254 B/op 6652 allocs/op
PASS
ok astar 3.665s