Closed rickyviking closed 2 years ago
It's a good suggestion.
Implemented a faster version of to_string().
Hi @mariusbancila, thank you, I confirm the benchmarks I run on your new implementation are in line with what I reported above. I've also created a PR #51 to implement the stream operator in term of the no fast to_string() method, rather than streaming individual chuncks.
Thanks for the PR. It's merged.
Benchmark on function uuids::to_string() shows poor performance, probably due to the usage of formatted streams for the conversion. An alternative approach based on this implementation shows a huge performance gain: benchmarks run for 1'000'000 entries (on i7-7820X 3.6GHz):
Are you open to consider the switch to the more efficient implementation?
This is somehow related to issue #41, but it's more correct to keep this topic independent, as the alternative hash function proposed in #41 is no more based on string conversion and performs better anyway.