copiousfreetime/torid

For consideration: switch to C-extension FNV

swrobel opened this issue · 1 comments

This one claims to be 500x faster: https://github.com/g-ken/cfnv

@swrobel Thanks for the link, I'll have to use that for something else at some point. I don't think I'll depend on it here for 2 reasons:

  • I'd like to keep torid a pure ruby gem - including its dependencies
  • FNV is used in torid as a hash function to create the node id - which is only done 1 time per Generator instance, on initialization. It is not performance critical at all. In the most vanilla case, if all you use is Torid.uuid then the fnv function is only called 1 time per invocation of the ruby run time.

Thanks!