[libcxx-commits] [libcxx] [libc++] Speed up classic locale (PR #70631)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 13 01:23:35 PST 2023
philnik777 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).
Ah, OK. I think that is the way to go right now. That should simplify this patch quite a bit. We can still look into inlining the functions later if we want to. Dropping this part will most likely also resolve any ABI issues.
https://github.com/llvm/llvm-project/pull/70631
More information about the libcxx-commits
mailing list