Question regarding tests #38
Labels
No labels
bug
discussion
documentation
duplicate
ignore
new feature
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
golibs/gms-gods#38
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi. I've a few questions about tests in binaryheap_test.go by example.
Thank you.
Perhaps, which is most likely, is that I did not understand the question. So excuse me if my answer misses the point.
That is a benchmark for popping, so the initialization step of populating (pushing) the heap should not be part of the benchmark, hence the stopping of the timer.
The pop function removes the element from the heap, which bubbles down the root elements, thus changing the internal storage. The function does return a value, that is not captured in the test as you said, but that shouldn't make much difference to the benchmark, right?