segmentio / ksuid

K-Sortable Globally Unique IDs
https://segment.com/blog/a-brief-history-of-the-uuid/
MIT License
4.82k stars 174 forks source link

Optimize byte swap base62 encoding #50

Closed achille-roussel closed 2 years ago

achille-roussel commented 2 years ago

This PR revisits an optimization that was added when we originally released this package, but appears not to be needed anymore:

name                    old time/op  new time/op  delta
AppendFastEncodeBase62   174ns ± 3%   165ns ± 3%  -4.91%  (p=0.000 n=10+10)
achille-roussel commented 2 years ago

Thanks for the review!