Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>With this version of java -XX:+DoEscapeAnalysis results in far less gc activity and 14x faster execution.</p> <pre><code>$ java -version java version "1.6.0_14" Java(TM) SE Runtime Environment (build 1.6.0_14-b08) Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing) $ uname -a Linux xxx 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 GNU/Linux </code></pre> <p>Without escape analysis,</p> <pre><code>$ java -server -verbose:gc EscapeAnalysis|cat -n 1 start 2 [GC 896K-&gt;102K(5056K), 0.0053480 secs] 3 [GC 998K-&gt;102K(5056K), 0.0012930 secs] 4 [GC 998K-&gt;102K(5056K), 0.0006930 secs] --snip-- 174 [GC 998K-&gt;102K(5056K), 0.0001960 secs] 175 [GC 998K-&gt;102K(5056K), 0.0002150 secs] 176 10000000 </code></pre> <p>With escape analysis,</p> <pre><code>$ java -server -verbose:gc -XX:+DoEscapeAnalysis EscapeAnalysis start [GC 896K-&gt;102K(5056K), 0.0055600 secs] 10000000 </code></pre> <p>The execution time reduces significantly with escape analysis. For this the loop was changed to 10e9 iterations,</p> <pre><code>public static void main(String [] args){ System.out.println("start"); for(int i = 0; i &lt; 1000*1000*1000; ++i){ Foo foo = new Foo(); } System.out.println(Foo.counter); } </code></pre> <p>Without escape analysis,</p> <pre><code>$ time java -server EscapeAnalysis start 1000000000 real 0m27.386s user 0m24.950s sys 0m1.076s </code></pre> <p>With escape analysis,</p> <pre><code>$ time java -server -XX:+DoEscapeAnalysis EscapeAnalysis start 1000000000 real 0m2.018s user 0m2.004s sys 0m0.012s </code></pre> <p>So with escape analysis the example ran about 14x faster than the non-escape analysis run.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload