Skip to content

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

Open
aitsuki wants to merge 1 commit intobeefsack:masterfrom
aitsuki:master
Open

Remove the 'close' and 'opened' fields.#8
aitsuki wants to merge 1 commit intobeefsack:masterfrom
aitsuki:master

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