LWN.net Logo

Good opportunity for Java update

Good opportunity for Java update

Posted Jul 16, 2012 21:33 UTC (Mon) by man_ls (subscriber, #15091)
In reply to: Good opportunity for Java update by raven667
Parent article: Galaxy in-memory data grid released

I think that my results might have been 100ns per synchronization, not 100ms. Sorry about the confusion; funny how memory can make you twist things around to suit your arguments. So let's check out how things behave in practice.

This bit of data seems to suggest that things have improved about 4-fold since then. My own results are a bit higher than those on the page (core i5; IcedTea6): 0.035s vs 0.002s for 1M synchronizations, suggesting a cost of about 30ns for each synchronization. Calling a synchronized method is even cheaper, about 20ns. Not too shabby...

My updated code yields:

1M computations: 0.035s
1M synchronized code blocks: 0.004s
1M synchronized method calls: 0.023s


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds