diff options
| author | Aiden Grossman <aidengrossman@google.com> | 2025-11-03 11:04:22 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-03 11:04:22 -0800 |
| commit | d200df0557b71fae0d77bc7fc1650d22a05af371 (patch) | |
| tree | 5f248678e21c8c9e44206b30512dde62b3514347 /third-party/boost-math/include_private/boost/math/tools/remez.hpp | |
| parent | fa2c5fe21df42accfcd4498aa7e6b2ae943357ea (diff) | |
| download | llvm-main.zip llvm-main.tar.gz llvm-main.tar.bz2 | |
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 'third-party/boost-math/include_private/boost/math/tools/remez.hpp')
0 files changed, 0 insertions, 0 deletions
