sporkmonger / uuidtools

A simple universally unique ID generation library.
http://uuidtools.rubyforge.org/
Apache License 2.0
425 stars 63 forks source link

Optimizations for UUID::parse_* and UUID::random_create #36

Closed kevin-at-reflexion closed 4 years ago

kevin-at-reflexion commented 9 years ago

Improves performance substantially on parse_raw, parse_int, parse_hexdigest and random_create. Performance for other methods are unaffected.

I've done my best to keep the behavior unchanged, even where the behavior doesn't appear covered by rspec.

Tested with ruby-1.9.3 and ruby-2.1.2.

kevin-at-reflexion commented 9 years ago

Oops, looks like UUID supports ruby-1.8.7, I'll go back and fix it for that.

kevin-at-reflexion commented 9 years ago

Should be good to go! Ran benchmarks on ruby-1.8.7, ruby-1.9.3, ruby-2.1.2, ree, and jruby.

sporkmonger commented 4 years ago

Manually merged due to conflicts.