[jdom-interest] Re: New realease, Text class... Arghh
Alex Rosen
arosen at silverstream.com
Mon Jan 28 10:33:14 PST 2002
> The layman's understanding I have of it is that HotSpot uses an "object
> nursery" for new objects (think a block of reserved memory) and only
> when the object lives through one full cycle of the nursery is it moved
> to the real heap. Since you don't get direct pointers in Java this is
> conveniently possible. Turns out to be far faster than malloc() in C.
> You'd have to do your own pooling in C to match it.
Dunno... I'd be very surprised if malloc + free in C wasn't significantly
faster than new + GC in Java. In my experience, reducing object allocation
(and GC that this implies) is one of the most productive ways to speed up
Java code.
Alex
More information about the jdom-interest
mailing list