This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/24704] __gnu_cxx::__exchange_and_add is called even for single threaded applications



------- Comment #19 from pcarlini at suse dot de  2005-11-08 14:54 -------
(In reply to comment #18)
> Sure, this is the general idea. I'm a little bit concerned that for something
> apparently so elemental as an addiction (atomic, yes...) we are going to add
> a conditional, but probably, given the many cycles of atomics, it's ok. Any
> chance you can benchmark a bit that? I gather you already played with adding
> those checks, can you measure the overhead of the conditional alone compared
> to not doing nothing (i.e., non-atomic inline addition/subtraction).

Actually, this kind of benchmarking is not necessary, because currently we
are always using the normal atomics. We have only to check that the additional
__gthread_active_p() conditional is not measurable wrt the atomics itself.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24704


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]