gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

faster retain/release in multithreaded apps, NSAffineTransform


From: Richard Frith-Macdonald
Subject: faster retain/release in multithreaded apps, NSAffineTransform
Date: Mon, 5 Mar 2007 16:34:13 +0000

I've added code to NSObject.m in subversion trunk to use atomic increment and decrement for the retain count rather than using locks. this should make a big increase to performance in applications with a lot of active threads. The new code should work on gnu/linux intel machines and on mswindows machines, but all other systems should fall back to using locks.
Could people with other systems please.
1. try it out to make sure that the fallback to use locks works correctly. 2. if possible, contribute code to use atomic increment and decrement instructions on their machine. The use of the atomic operations should be pretty clear, just search for 'GSATOMIC' in NSObject.m
Of course, spotting any mistakes would be good too.

The other tricky thing today was porting NSAffineTransform optimisations from mySTEP ... the changes there will require a rebuild of the gui andfback libraries since the size of NSAffineTransform objects has changed. Also, while I definitely fixed a couple of bugs (one in the original code and one in the mySTEP code), I could have introduced others ... please look out for any reproducible oddities.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]