This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] libstdc++ atomicity, x86 agnostic version
Gabriel Dos Reis wrote:
Why not just ditch that ref from foo()?
Yeah, thanks Gaby for you feedback.
I already did that and tried to simulate the overall effect of Benjamin's
work by simply removing the inline keywork from the current
__exchange_and_add and __atomic_add.
These are the numbers (-O2, P4-2400) (Jakub_am is without the &)
current
=======
Jakub (50000000 iters)
5.590u 0.000s 0:05.74 97.3% 0+0k 0+0io 160pf+0w
Jakub_am (50000000)
11.250u 0.000s 0:11.57 97.2% 0+0k 0+0io 160pf+0w
patched
=======
Jakub (50000000)
6.370u 0.000s 0:06.55 97.2% 0+0k 0+0io 162pf+0w
Jakub_am (50000000)
12.600u 0.000s 0:12.96 97.2% 0+0k 0+0io 162pf+0w
So, for this kind of testcase, on the x86 architecture, is a loss of
about 10-12%.
I don't know if we want to live with that... Gaby? Opinions?
Paolo.
- References:
- [RFC] libstdc++ atomicity, x86 agnostic version
- Re: [RFC] libstdc++ atomicity, x86 agnostic version
- Re: [RFC] libstdc++ atomicity, x86 agnostic version
- Re: [RFC] libstdc++ atomicity, x86 agnostic version
- Re: [RFC] libstdc++ atomicity, x86 agnostic version
- Re: [RFC] libstdc++ atomicity, x86 agnostic version
- Re: [RFC] libstdc++ atomicity, x86 agnostic version
- Re: [RFC] libstdc++ atomicity, x86 agnostic version
- Re: [RFC] libstdc++ atomicity, x86 agnostic version
- Re: [RFC] libstdc++ atomicity, x86 agnostic version
- Re: [RFC] libstdc++ atomicity, x86 agnostic version
- Re: [RFC] libstdc++ atomicity, x86 agnostic version