Skip to content

Conversation

aitsuki
Copy link

@aitsuki aitsuki commented Jan 27, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant