[libcxx-commits] [libcxx] [libc++] Speed up classic locale (PR #70631)
Dmitry Vyukov via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 13 01:19:09 PST 2023
dvyukov wrote:
> I'm a bit confused about this. The statements here seem contradictory. Could you try to reword this?
This change does 2 optimizations:
1. Allow inlining of the common locale ctor/dtor.
2. Avoid atomic reference counting for the classic locale.
(1) has small fixed-size impact (shaves off few cycles).
(2) may have very profound effect on highly threaded apps that use locale/streams concurrently (these numbers like -98.22%).
If inlining creates problems that are hard to resolve, then I am ready to drop it from this change and leave only optimization (2).
https://github.com/llvm/llvm-project/pull/70631
More information about the libcxx-commits
mailing list