You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Leo Sutic <le...@gmail.com> on 2004/07/18 22:06:18 UTC
Cost of Synchronization
Every now and then the subject comes up: Are we losing performance due
to methods being synchronized?
Some figures (for Java1.3.1, but anyway):
http://www.cs.umd.edu/~pugh/IsCodeOptimizationRelevant.pdf
Performance (2 processor Ultra 60)
- HotSpot (1.3 beta)
- Original: 4788
- Altered: 4923 (+3%) [This is the un-synchronized version]
- Exact VM (1.2.2)
- Original: 6649
- Altered: 6874 (+3%) [This is the un-synchronized version]
- Not a big win (3%)
- Which JVM used more of an issue
- Exact JVM does a better job of interfacing with
Solaris networking libraries?
Some quotes:
Lessons:
...
But the real problem was the algorithm
Cost of stupidity higher than cost of synchronization
I found this via Ted Leung - http://www.sauria.com/blog Quite a cool
blog, BTW. He comes up with gems fairly regularly.
/LS