Suitability (of Java)

Don Smith dss-lfs at
Mon Apr 5 11:51:31 PDT 2004

Tushar Teredesai wrote:
> Don Smith wrote:
>> Did you try the Allocate one also? On my system the Java version took 
>> 40 times longer. Of course that's a slightly unfair test since it 
>> picks on the garbage collector. And if you have 4GB of physical memory 
>> you might not see a difference unless you adjust the iteration counter 
>> upwards.
> Nope didn't try it. Coz these small tests are not very useful. That is 
> why I inquired about links to official benchmarks. I used to have 
> bookmarks to some benchmarks but not anymore.

Well, the small speed test showed me that the latest *run-time compiled* 
  Java code runs as fast if not faster than C++ code. Why wouldn't this 
small test be valid for showing the problems with depending on GC?

Note, I am all for garbage collection - it will keep a slightly buggy 
server up - by why not allow the programmer to actively return a buffer 
to the pool? Is it not more efficient to just release the buffer than to 
search through all data memory for references to the buffer then release 
it? Just add the delete functionality but don't require its usage so 
that servers can use it if needed. This is really my only remaining 
large criticism of Java (on a server).

Minor JIT gripe: if you're going to compile the server classes anyway, 
why wait until runtime?

More information about the hlfs-dev mailing list