[libcxx-commits] [libcxx] [libc++] Use char_traits::copy while inserting when possible (PR #97201)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 2 04:12:06 PDT 2024


philnik777 wrote:

> What effect does this have on the benchmarks? If we're getting the optimization, I would expect this to be observable.
> 
> Also, was the lines of assembly in a debug or optimized build configurations?

AFAICT we don't have any benchmarks for `string::insert`. The asm was for an optimized build. Here you can see why the difference is so significant: https://godbolt.org/z/bs938GKfY


https://github.com/llvm/llvm-project/pull/97201


More information about the libcxx-commits mailing list