aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenHLSL/builtins/pow.hlsl
diff options
context:
space:
mode:
authorAiden Grossman <aidengrossman@google.com>2025-11-03 11:04:22 -0800
committerGitHub <noreply@github.com>2025-11-03 11:04:22 -0800
commitd200df0557b71fae0d77bc7fc1650d22a05af371 (patch)
tree5f248678e21c8c9e44206b30512dde62b3514347 /clang/test/CodeGenHLSL/builtins/pow.hlsl
parentfa2c5fe21df42accfcd4498aa7e6b2ae943357ea (diff)
downloadllvm-main.zip
llvm-main.tar.gz
llvm-main.tar.bz2
[libcxx] Remove Redundant Reset in ~basic_string (#164718)HEADmain
8dae17be2991cd7f0d7fd9aa5aecd064520a14f6 refactors basic_string for more code reuse. This makes sense in most cases, but has performance overhead in the case of ~basic_string. The refactoring of ~basic_string to call __reset_internal_buffer() added a redundant (inside the destructor) reset of the object, which the optimizer is unable to optimize away in many cases. This patch prevents a ~1% regression we observed on an internal workload when applying the original refactoring. This does slightly pessimize the code readability, but I think this change is worth it given the performance impact. I'm hoping to add a benchmark(s) to the upstream libc++ benchmark suite around string construction/destruction to ensure that this case does not regress as it seems common in real world applications. I will put up a separate PR for that when I figure out a reasonable way to write it.
Diffstat (limited to 'clang/test/CodeGenHLSL/builtins/pow.hlsl')
0 files changed, 0 insertions, 0 deletions