Hi David, Le 10 août 09 à 01:36, David Chisnall a écrit :
> One of the main reasons I did this was that I was interested by > Apple's claim that adding a new object to a Grand Central Dispatch > queue in 15 instructions. This is somewhat disingenuous. Locking and > unlocking the spinlock is 5 instructions, but these instructions > acquire the lock line and so are not particularly fast instructions. > In terms of real-world performance, acquiring and releasing a pthread > mutex is fairly close (factor of two) on any platform I tried Interesting to know. > except OS X; maybe they'd shout about it a bit less if their pthread > implementation[1] were not an embarrassment, as the performance gain > relative to Apple's mutex implementation is a factor of 100 or so, > while relative to anyone else's (including one I wrote in five > minutes) is closer to a factor of 2. The result could be completly different in Mac OS X 10.6 though. In fact, I'd be suprised if they didn't rewrite their mutex implementation given the result you report. Cheers, Quentin. _______________________________________________ Etoile-dev mailing list Etoile-dev@gna.org https://mail.gna.org/listinfo/etoile-dev