Skip to content

Conversation

orisano
Copy link
Contributor

@orisano orisano commented Mar 28, 2022

name         old time/op  new time/op  delta
AddSafe-8    96.6µs ± 1%  83.1µs ± 1%  -14.03%  (p=0.000 n=10+10)
AddUnsafe-8  78.4µs ± 1%  67.7µs ± 2%  -13.57%  (p=0.000 n=9+10)

@orisano orisano changed the title feat: improve add performance feat: improve Add performance Mar 28, 2022
@deckarep
Copy link
Owner

@orisano - this is a slick improvement and clever. I wouldn't have expected to realize such gains.

I suppose the overhead is in getting rid of the need to do a comparison/branch.

@deckarep deckarep merged commit 29bd72c into deckarep:main Mar 29, 2022
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.

2 participants