|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2000-06-06 21:08:02
Uh, never mind. I just read
http://www.peerdirect.com/resources/gotw045a.html which shows that it is in
fact pretty fast.
-Dave
----- Original Message -----
From: "David Abrahams" <abrahams_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, June 06, 2000 9:07 PM
Subject: Re: [boost] RFC: Multithreading design constraints
> From: "John Maddock" <John_Maddock_at_[hidden]>
> > Well here's the performance comparison from MSDN:
> >
> > Table 1. Comparison times when incrementing a counter.
> >
> > regular memory variable: 31.25 nanoseconds
> > atomic counter: 178.1 nanoseconds
> > critical section: 504.6 nanoseconds
> >
> >
> > So an atomic increment is about 4x faster than a critical section.
>
> AFAIK, the atomic counter you are referring to (I assume
> InterlockedIncrement here) is a fairly heavyweight function call designed
to
> work on SMP systems, and not the simple one-instruction atomic
> count-and-test which is available in almost all ISAs. One would expect the
> latter to show a much greater improvement in speed.
>
> -Dave
>
>
> ------------------------------------------------------------------------
> Take your development to new heights. Work with clients like Dell and
> pcOrder. Submit your resume to jobs_at_liaison.com. Visit us at
> http://click.egroups.com/1/4358/3/_/9351/_/960340109/
> ------------------------------------------------------------------------
>
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk