Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the 'close' and 'opened' fields. #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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