Slashdot Mirror


User: mallorean

mallorean's activity in the archive.

Stories
0
Comments
2
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2

  1. Re:Java is slow on Java Performance Urban Legends · · Score: 2, Informative
    Did anyone try running the obvious test....
    public class RunLoop
    {
    public static void main( String[] args )
    {
    while ( true )
    {
    Object o = new Object();
    o = null;
    }
    }
    }
    You can run this till the cows come home and you won't run out of memory. Running the JVM with 64MB and -verbosegc
    ....
    [GC 606K->94K(1984K), 0.0004234 secs]
    .... quizillion times....
    [GC 606K->94K(1984K), 0.0004110 secs]
    ....
    As you can see:
    1. The VM does free memory in "real-time" ( whatever that may mean )
    2. The amortized amount of memory is zero ( it keeps falling back to the base 94K used for the base java classes.
    If you realy want to know how the VMs memory works and how to tune it, you could do worse than read the Hotspot GC Notes. Agreed that Java is not the greatest language there could be, but it is the best mainstream language for a majority of applications. BTW, this test was done on a rather obsolete PIII
    Memory: 127544k/130944k available (1008k kernel code, 412k reserved, 1636k data, 64k init)
    DENTRY hash table entries: 262144 (order: 9, 2097152 bytes)
    Buffer-cache hash table entries: 131072 (order: 7, 524288 bytes)
    Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
    VFS: Diskquotas version dquot_6.4.0 initialized
    CPU: Intel Pentium III (Katmai) stepping 03
  2. More details at Science and Nature on Build Your Own Virus · · Score: 4, Informative
    Science (subscription required)and Nature have more details. The citation of the paper is

    Cello, J., Paul, A.V. & Wimmer, E. Chemical synthesis of poliovirus cDNA: Generation of infectious virus in the absence of natural template. Science published online, doi:10.1126/science.1072266 (2002).