Etienne M. Gagnon wrote: > Artur Biesiadowski wrote: > >> First - removing as much synchronization as possible, while staying >> compatible is certainly a good thing. Synchronizing is _really_ costly - > > > Have you heard of "thin locks" and other VM level optimizations that > reduces "significantly" the cost of locks? Do not compute the cost of > locks based on their implementation in Sun's old JDK, or based on an > implementation that does not implement state-of-the-art techniques.
Synchronization techniques have improved, however it will always be slow (relative to other operations) in a multithreaded/multiprocessing environment, because it cannot be done without some form of spinlocking or memory bus synchronization. The only way to truely make it fast for a multiprocessor would be to come up with some magic bus architechture which is as fast as the cpu cores! > Systems like "HotSpot/Jalapeno" are getting to the point where the are > able to identify things like "single threaded programs" and thus > eliminate all lock operations when possible. Yes. But remember that many of the applications that are hurt most by synchronization (AWT, Swing) are never single threaded. regards Bryce. _______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath