Robert Shearman rob@codeweavers.com writes:
Yes, I agree. In fact the patch actually decreases performance. Test: 10,000,000 calls to EnterCriticalSection & LeaveCriticalSection, simulating fast path on critical sections. Results: Win2k - 1000ms Wine w/ patch - 1346ms Wine w/o patch - 1294ms
I think the best way to improve performance of the critical section functions is to rewrite them in assembly and I will submit a patch doing so when I have a spare moment.
I don't think that's necessary either, unless you have good evidence that the critical section non-contention path represents a significant amount of the total time spent by an application. IMO we have much bigger performance issues to solve first, before we make the critical section code unreadable just to save a couple of cycles.