Hi Brad, I think that there is no global lock for heap allocation, at least for small objects. As a support for this claim:
http://www.ibm.com/developerworks/java/library/j-jtp09275.html (see more specifically: "Thread-local allocation", but the article is really interesting as a whole.) I am interested in this global cache for valueOf thing and haven't find any good explanations on that phenomena. Does someone have a link to some ressources? Thank you very much, Nicolas. On Sat, 2009-08-08 at 09:49 -0700, Bradbev wrote: > > I'm not sure how to determine why calling 'new Double' each time > > through NewDoubleTest's inner loop causes 2 threads to perform not > > much better than 1. The best possible explanation I've heard is from > > Nicolas Oury -- perhaps we are measuring the bandwidth from cache to > > main memory, not raw computational ability of the processor cores. > > I assume that 'new Double' is actually doing a heap alloc? In that > case, won't a lock need to be aquired for the allocation? With a high > enough alloc rate, GC and the heap lock will reduce performance a lot. > > Brad > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---