zyro / elixir-uuid

UUID generator and utilities for Elixir
Apache License 2.0
361 stars 84 forks source link

Optimize string_to_binary and binary_to_string #38

Closed whatyouhide closed 5 years ago

whatyouhide commented 5 years ago

I've taken the optimizations used in Ecto.UUID and applied them here too. Benchmark shows that string_to_binary only improves slightly (because of the String.downcase/1 at the beginning I suspect) but binary_to_string becomes twice as fast.

See also https://github.com/elixir-ecto/ecto/commit/3bd6934ed133f65a47f4a40ed5aa7b7e726bfeb0.

whatyouhide commented 5 years ago

Ping @zyro 😃

zyro commented 5 years ago

Thanks! I'll run the benchmarks as well before I tag a new release.

whatyouhide commented 5 years ago

Sweet, ofc. Let me know how that goes!

whatyouhide commented 5 years ago

Hey @zyro, any chance we could get a release with this?

zyro commented 5 years ago

@whatyouhide 1.2.1 is up.