3 ms·
I’d be more interested in “this is faster than X” claims if it does a fair comparison - pushing the implementation out of the header. Otherwise (depending on op
by olliej 8y ago
I’d be more interested in “this is faster than X” claims if it does a fair comparison - pushing the implementation out of the header. Otherwise (depending on operation) inlining ends up significantly throwing off performance numbers.
That said it’s much easier to make faster than libN string libraries if you don’t have abi constraints to deal with.
This uses any value struct to hold much of its metadata which causes all sorts of abi issues - basically, if your own app uses this it can’t expose it to plugins or anything, otherwise any update could break existing compiled plugins.
- ddtaylor 8y ago> The current benchmarks outperform the standard string implementations of GCC, Clang, MSVC and ICC by a factor of two or more in most tests.
- johnboyer 8y agoMost of the STL is header only, which is what the library is compared to in the benchmarks. Both would be just as likely to get inlined.
- flohofwoe 8y agoWhether a function body is implemented in a header or implementation source file doesn't matter much these days where LTO/LTCG is common. If the compiler/linker thinks a function is fit for inlining it will do so.