This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51798] [4.7 regression] libstdc++ atomicity performance regression due to __sync_fetch_and_add
- From: "dje at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 09 Jan 2012 17:11:32 +0000
- Subject: [Bug libstdc++/51798] [4.7 regression] libstdc++ atomicity performance regression due to __sync_fetch_and_add
- Auto-submitted: auto-generated
- References: <bug-51798-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51798
--- Comment #3 from David Edelsohn <dje at gcc dot gnu.org> 2012-01-09 17:11:32 UTC ---
Another alternative is to modify __gnu_cxx::_atomic_add() to perform acquire
semantics for positive increments and release semantics for negative
increments. That avoid creating a new function in the __gnu_cxx space.