Closed whatyouhide closed 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.
Ecto.UUID
string_to_binary
String.downcase/1
binary_to_string
See also https://github.com/elixir-ecto/ecto/commit/3bd6934ed133f65a47f4a40ed5aa7b7e726bfeb0.
Ping @zyro 😃
Thanks! I'll run the benchmarks as well before I tag a new release.
Sweet, ofc. Let me know how that goes!
Hey @zyro, any chance we could get a release with this?
@whatyouhide 1.2.1 is up.
I've taken the optimizations used in
Ecto.UUID
and applied them here too. Benchmark shows thatstring_to_binary
only improves slightly (because of theString.downcase/1
at the beginning I suspect) butbinary_to_string
becomes twice as fast.See also https://github.com/elixir-ecto/ecto/commit/3bd6934ed133f65a47f4a40ed5aa7b7e726bfeb0.