<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Direct access 300 times faster in Java?</title>
	<atom:link href="http://codemonkeyism.com/direct-access-300-times-faster-in-java/feed/" rel="self" type="application/rss+xml" />
	<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/</link>
	<description></description>
	<lastBuildDate>Wed, 09 May 2012 22:39:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: David</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-826839</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 11 Jan 2012 09:43:13 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-826839</guid>
		<description>Ubuntu 10.04 amd64
Intel(R) Core(TM)2 Duo CPU     E7500  @ 2.93GHz
java version &quot;1.6.0_26&quot;

Direkt: 3 42000000000
Getter: 350 42000000000</description>
		<content:encoded><![CDATA[<p>Ubuntu 10.04 amd64<br />
Intel(R) Core(TM)2 Duo CPU     E7500  @ 2.93GHz<br />
java version &#8220;1.6.0_26&#8243;</p>
<p>Direkt: 3 42000000000<br />
Getter: 350 42000000000</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-245448</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Thu, 24 Sep 2009 05:33:54 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-245448</guid>
		<description>@David: Not sure. You did try the exact code? Which VM (1.6)? Server?

Right now - without Server - I get 

Direkt: 1656 42000000000
Getter: 1656 42000000000

on my Thinkpad. With server I get

Direkt: 0 42000000000
Getter: 1031 42000000000

I&#039;d think the JVM removes the object completely and just inlines the variable.</description>
		<content:encoded><![CDATA[<p>@David: Not sure. You did try the exact code? Which VM (1.6)? Server?</p>
<p>Right now &#8211; without Server &#8211; I get </p>
<p>Direkt: 1656 42000000000<br />
Getter: 1656 42000000000</p>
<p>on my Thinkpad. With server I get</p>
<p>Direkt: 0 42000000000<br />
Getter: 1031 42000000000</p>
<p>I&#8217;d think the JVM removes the object completely and just inlines the variable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-245445</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 24 Sep 2009 04:12:29 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-245445</guid>
		<description>Well I tried the 1st example on Snow Leopard and:

Direkt: 2 42000000000
Getter: 552 42000000000

which is approximately 3oox slower for the getter. I&#039;m stumped and stunned.

Any ideas?

David</description>
		<content:encoded><![CDATA[<p>Well I tried the 1st example on Snow Leopard and:</p>
<p>Direkt: 2 42000000000<br />
Getter: 552 42000000000</p>
<p>which is approximately 3oox slower for the getter. I&#8217;m stumped and stunned.</p>
<p>Any ideas?</p>
<p>David</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-221980</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sat, 27 Dec 2008 22:47:07 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-221980</guid>
		<description>@Sergey: Yes, may be the case.</description>
		<content:encoded><![CDATA[<p>@Sergey: Yes, may be the case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-221863</link>
		<dc:creator>Sergey</dc:creator>
		<pubDate>Sat, 27 Dec 2008 18:21:38 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-221863</guid>
		<description>I think the cause of all these weird results when direct access is hundreds times faster then with  getters is in the example. The result of the first iteration is never used.
I modified the example, and here is the modification:
long sumDirect = 0L;
long tDirektStart = System.currentTimeMillis();
for (int i=0; i&lt;1000000000; i++) {
      sumDirect += test.value;
}
long tDirekt = System.currentTimeMillis() + tDirektStart;
    
long sumGetter= 0L;
long tGetterStart = System.currentTimeMillis();
for (int i=0; i&lt;1000000000; i++) {
      sumGetter += test.getValue();
}
long tGetter = System.currentTimeMillis() - tGetterStart;

System.out.println(&quot;Direkt: &quot; + tDirekt + &quot; &quot; + sumDirect);
System.out.println(&quot;Getter: &quot; + tGetter + &quot; &quot; + sumGetter);

And here is the output:
Direkt: 401 42000000000
Getter: 407 42000000000


So back to the original example. Perhaps  JVM detects that the sum is zeroed out after the first loop, and completely bypasses the loop.</description>
		<content:encoded><![CDATA[<p>I think the cause of all these weird results when direct access is hundreds times faster then with  getters is in the example. The result of the first iteration is never used.<br />
I modified the example, and here is the modification:<br />
long sumDirect = 0L;<br />
long tDirektStart = System.currentTimeMillis();<br />
for (int i=0; i&lt;1000000000; i++) {<br />
      sumDirect += test.value;<br />
}<br />
long tDirekt = System.currentTimeMillis() + tDirektStart;</p>
<p>long sumGetter= 0L;<br />
long tGetterStart = System.currentTimeMillis();<br />
for (int i=0; i&lt;1000000000; i++) {<br />
      sumGetter += test.getValue();<br />
}<br />
long tGetter = System.currentTimeMillis() &#8211; tGetterStart;</p>
<p>System.out.println(&#8220;Direkt: &#8221; + tDirekt + &#8221; &#8221; + sumDirect);<br />
System.out.println(&#8220;Getter: &#8221; + tGetter + &#8221; &#8221; + sumGetter);</p>
<p>And here is the output:<br />
Direkt: 401 42000000000<br />
Getter: 407 42000000000</p>
<p>So back to the original example. Perhaps  JVM detects that the sum is zeroed out after the first loop, and completely bypasses the loop.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-221733</link>
		<dc:creator>Sergey</dc:creator>
		<pubDate>Sat, 27 Dec 2008 13:22:25 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-221733</guid>
		<description>Test on MacBook Pro.
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)

Direkt: 3 42000000000
Getter: 401 42000000000

What&#039;s interesting is when I marked the value field final
I got the following results:

Direkt: 3 42000000000
Getter: 73 42000000000

Marking the getter final does not have any affect.</description>
		<content:encoded><![CDATA[<p>Test on MacBook Pro.<br />
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)</p>
<p>Direkt: 3 42000000000<br />
Getter: 401 42000000000</p>
<p>What&#8217;s interesting is when I marked the value field final<br />
I got the following results:</p>
<p>Direkt: 3 42000000000<br />
Getter: 73 42000000000</p>
<p>Marking the getter final does not have any affect.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-189680</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Thu, 30 Oct 2008 14:07:30 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-189680</guid>
		<description>@Asd: Yes, I came to the same conclusion, see above &lt;i&gt;&quot;2.) There is no Test object in the code anymore, no direct access only a variable because &#039;… the JVM might completly inline an object if it detects only one read-access object inside a loop.&#039;”&lt;/i&gt;</description>
		<content:encoded><![CDATA[<p>@Asd: Yes, I came to the same conclusion, see above <i>&#8220;2.) There is no Test object in the code anymore, no direct access only a variable because &#8216;… the JVM might completly inline an object if it detects only one read-access object inside a loop.&#8217;”</i></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Asd</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-189646</link>
		<dc:creator>Asd</dc:creator>
		<pubDate>Thu, 30 Oct 2008 12:22:15 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-189646</guid>
		<description>The server VM is most likely eliminating the object and the loop entirely :)
Does anyone have a debug build of the JDK installed? It can print the generated assembly code.</description>
		<content:encoded><![CDATA[<p>The server VM is most likely eliminating the object and the loop entirely :)<br />
Does anyone have a debug build of the JDK installed? It can print the generated assembly code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renjith</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-167787</link>
		<dc:creator>Renjith</dc:creator>
		<pubDate>Tue, 16 Sep 2008 10:16:14 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-167787</guid>
		<description>correction to the test3 (earlier the jvm was busy with another process) :)

Test3: On Windows XP

with -server option

Direkt: 250 42000000000
Getter: 938 42000000000</description>
		<content:encoded><![CDATA[<p>correction to the test3 (earlier the jvm was busy with another process) :)</p>
<p>Test3: On Windows XP</p>
<p>with -server option</p>
<p>Direkt: 250 42000000000<br />
Getter: 938 42000000000</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Syed</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-167785</link>
		<dc:creator>Syed</dc:creator>
		<pubDate>Tue, 16 Sep 2008 10:08:28 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-167785</guid>
		<description>With -server option to the JVM in Windows XP, Direct access is the sure winner.

Direkt: 0 42000000000
Getter: 1063 42000000000

java version &quot;1.6.0_10-rc&quot;
Java(TM) SE Runtime Environment (build 1.6.0_10-rc-b28)
Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)</description>
		<content:encoded><![CDATA[<p>With -server option to the JVM in Windows XP, Direct access is the sure winner.</p>
<p>Direkt: 0 42000000000<br />
Getter: 1063 42000000000</p>
<p>java version &#8220;1.6.0_10-rc&#8221;<br />
Java(TM) SE Runtime Environment (build 1.6.0_10-rc-b28)<br />
Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renjith</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-167784</link>
		<dc:creator>Renjith</dc:creator>
		<pubDate>Tue, 16 Sep 2008 10:07:06 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-167784</guid>
		<description>Test3: On Windows XP

with -server option

Direkt: 1765 42000000000
Getter: 938 42000000000

Test4: Ubuntu Running in Sun VirtualBox on Windows XP (This test may not be of any relevance as the base instructions are again run on windows, but still thought of putting it here)

with -server option

Direkt: 78 42000000000
Getter: 1362 42000000000


This is getting Interesting !!!!!!!!!!!!!!!!!!!!!</description>
		<content:encoded><![CDATA[<p>Test3: On Windows XP</p>
<p>with -server option</p>
<p>Direkt: 1765 42000000000<br />
Getter: 938 42000000000</p>
<p>Test4: Ubuntu Running in Sun VirtualBox on Windows XP (This test may not be of any relevance as the base instructions are again run on windows, but still thought of putting it here)</p>
<p>with -server option</p>
<p>Direkt: 78 42000000000<br />
Getter: 1362 42000000000</p>
<p>This is getting Interesting !!!!!!!!!!!!!!!!!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renjith</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-167781</link>
		<dc:creator>Renjith</dc:creator>
		<pubDate>Tue, 16 Sep 2008 10:02:25 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-167781</guid>
		<description>Test1: On Windows XP

java version &quot;1.6.0_07&quot;
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

Direkt: 1688 42000000000
Getter: 1687 42000000000

Test2: Ubuntu Running in Sun VirtualBox on Windows XP (This test may not be of any relevance as the base instructions are again run on windows, but still thought of putting it here)

java version &quot;1.6.0_06&quot;
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)

Direkt: 1817 42000000000
Getter: 1860 42000000000</description>
		<content:encoded><![CDATA[<p>Test1: On Windows XP</p>
<p>java version &#8220;1.6.0_07&#8243;<br />
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)<br />
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)</p>
<p>Direkt: 1688 42000000000<br />
Getter: 1687 42000000000</p>
<p>Test2: Ubuntu Running in Sun VirtualBox on Windows XP (This test may not be of any relevance as the base instructions are again run on windows, but still thought of putting it here)</p>
<p>java version &#8220;1.6.0_06&#8243;<br />
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)<br />
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)</p>
<p>Direkt: 1817 42000000000<br />
Getter: 1860 42000000000</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Syed</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-167778</link>
		<dc:creator>Syed</dc:creator>
		<pubDate>Tue, 16 Sep 2008 09:52:44 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-167778</guid>
		<description>Direct access is much faster with jdk 1.6 on Linux 

Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)

Direkt: 12 42000000000
Getter: 1002 42000000000</description>
		<content:encoded><![CDATA[<p>Direct access is much faster with jdk 1.6 on Linux </p>
<p>Java(TM) SE Runtime Environment (build 1.6.0_06-b02)<br />
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)</p>
<p>Direkt: 12 42000000000<br />
Getter: 1002 42000000000</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Syed</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-167771</link>
		<dc:creator>Syed</dc:creator>
		<pubDate>Tue, 16 Sep 2008 09:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-167771</guid>
		<description>The following are the results from running it on Linux (CentOS)... 
Direct access is much faster than getter  :( 

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Server VM (build 1.5.0_11-b03, mixed mode)

Direkt: 106 42000000000
Getter: 642 42000000000</description>
		<content:encoded><![CDATA[<p>The following are the results from running it on Linux (CentOS)&#8230;<br />
Direct access is much faster than getter  :( </p>
<p>Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)<br />
Java HotSpot(TM) Server VM (build 1.5.0_11-b03, mixed mode)</p>
<p>Direkt: 106 42000000000<br />
Getter: 642 42000000000</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-165538</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Fri, 12 Sep 2008 05:41:23 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-165538</guid>
		<description>moizd:
1.) There is a warm up in the original code, see post

2.) There is no Test object in the code anymore, no direct access only a variable because &quot;... the JVM might completly inline an object if it detects only one read-access object inside a loop.&quot;

3.) See my comment #25 and above to make the JVM use objects and prevent eliminating them alltogether (what the JVM seems to do for 1 and 2 object but not 3 and above). The non-server JIT doesn&#039;t eliminate objects.</description>
		<content:encoded><![CDATA[<p>moizd:<br />
1.) There is a warm up in the original code, see post</p>
<p>2.) There is no Test object in the code anymore, no direct access only a variable because &#8220;&#8230; the JVM might completly inline an object if it detects only one read-access object inside a loop.&#8221;</p>
<p>3.) See my comment #25 and above to make the JVM use objects and prevent eliminating them alltogether (what the JVM seems to do for 1 and 2 object but not 3 and above). The non-server JIT doesn&#8217;t eliminate objects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred Lung</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-165413</link>
		<dc:creator>Fred Lung</dc:creator>
		<pubDate>Thu, 11 Sep 2008 20:23:15 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-165413</guid>
		<description>About Dhananjay Nene test :
System.currentTimeMillis()  measures time elapsed in the actual life not the time consumed to run the code.
What other processes are run by the O.S. while you are running your micro benchmark ?</description>
		<content:encoded><![CDATA[<p>About Dhananjay Nene test :<br />
System.currentTimeMillis()  measures time elapsed in the actual life not the time consumed to run the code.<br />
What other processes are run by the O.S. while you are running your micro benchmark ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: moizd</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-165328</link>
		<dc:creator>moizd</dc:creator>
		<pubDate>Thu, 11 Sep 2008 16:35:07 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-165328</guid>
		<description>I am hoping someone can explain what I am observing. I tried out Stephan&#039;s original example with a couple of differences on my dell laptop ( Pentium M). The 2 differences were:

a) I modified the benchmark with extra loops to &quot;warm&quot; up the hotpot vm before the actual benchmark:

public class Test
{
	public int value = 42;

	public int getValue()
	{
		return value;
	}

	public static void main( String[] args )
	{
		Test test = new Test();
		
		int dummy;

		long sum = 0L;
		// extra &quot;warm-up&quot; direct loop
		for (int i = 0; i &lt; 1000000000; i  )
		{
		    sum  = test.value;
		    sum  = test.getValue();
		}


		sum = 0L;
		long tDirektStart = System.currentTimeMillis();
		for (int i = 0; i &lt; 1000000000; i  )
		{
			sum  = test.value;
		}
		long tDirekt = System.currentTimeMillis() - tDirektStart;

		sum = 0L;
		long tGetterStart = System.currentTimeMillis();
		for (int i = 0; i java -server -version
java version &quot;1.6.0_03&quot;
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)

C:\Projects\java\trunk\misc\target\classes&gt;java -version
java version &quot;1.6.0_03&quot;
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)

C:\Projects\java\trunk\misc\target\classes&gt;java -server -cp . Test

Direkt: 15 42000000000
Getter: 1250 42000000000

C:\Projects\java\trunk\misc\target\classes&gt;java -server -cp . Test

Direkt: 0 42000000000
Getter: 1266 42000000000

C:\Projects\java\trunk\misc\target\classes&gt;java -cp . Test
Direkt: 3282 42000000000
Getter: 3297 42000000000

@lumpynose:
With the -server jvm I see at a 2 orders of magnitude higher performance with direct access. If the server jvm was optimizing the getter to an inline call, why is this difference?</description>
		<content:encoded><![CDATA[<p>I am hoping someone can explain what I am observing. I tried out Stephan&#8217;s original example with a couple of differences on my dell laptop ( Pentium M). The 2 differences were:</p>
<p>a) I modified the benchmark with extra loops to &#8220;warm&#8221; up the hotpot vm before the actual benchmark:</p>
<p>public class Test<br />
{<br />
	public int value = 42;</p>
<p>	public int getValue()<br />
	{<br />
		return value;<br />
	}</p>
<p>	public static void main( String[] args )<br />
	{<br />
		Test test = new Test();</p>
<p>		int dummy;</p>
<p>		long sum = 0L;<br />
		// extra &#8220;warm-up&#8221; direct loop<br />
		for (int i = 0; i &lt; 1000000000; i  )<br />
		{<br />
		    sum  = test.value;<br />
		    sum  = test.getValue();<br />
		}</p>
<p>		sum = 0L;<br />
		long tDirektStart = System.currentTimeMillis();<br />
		for (int i = 0; i &lt; 1000000000; i  )<br />
		{<br />
			sum  = test.value;<br />
		}<br />
		long tDirekt = System.currentTimeMillis() &#8211; tDirektStart;</p>
<p>		sum = 0L;<br />
		long tGetterStart = System.currentTimeMillis();<br />
		for (int i = 0; i java -server -version<br />
java version &#8220;1.6.0_03&#8243;<br />
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)<br />
Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)</p>
<p>C:\Projects\java\trunk\misc\target\classes&gt;java -version<br />
java version &#8220;1.6.0_03&#8243;<br />
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)<br />
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)</p>
<p>C:\Projects\java\trunk\misc\target\classes&gt;java -server -cp . Test</p>
<p>Direkt: 15 42000000000<br />
Getter: 1250 42000000000</p>
<p>C:\Projects\java\trunk\misc\target\classes&gt;java -server -cp . Test</p>
<p>Direkt: 0 42000000000<br />
Getter: 1266 42000000000</p>
<p>C:\Projects\java\trunk\misc\target\classes&gt;java -cp . Test<br />
Direkt: 3282 42000000000<br />
Getter: 3297 42000000000</p>
<p>@lumpynose:<br />
With the -server jvm I see at a 2 orders of magnitude higher performance with direct access. If the server jvm was optimizing the getter to an inline call, why is this difference?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-165141</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Thu, 11 Sep 2008 09:13:27 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-165141</guid>
		<description>@ny: http://code.google.com/p/syntaxhighlighter/downloads/list</description>
		<content:encoded><![CDATA[<p>@ny: <a href="http://code.google.com/p/syntaxhighlighter/downloads/list" rel="nofollow">http://code.google.com/p/syntaxhighlighter/downloads/list</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ny</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-164847</link>
		<dc:creator>ny</dc:creator>
		<pubDate>Wed, 10 Sep 2008 14:59:53 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-164847</guid>
		<description>An easy question, what utility do you use for rendering the code listing as an old printed list ?
Thanks
ny</description>
		<content:encoded><![CDATA[<p>An easy question, what utility do you use for rendering the code listing as an old printed list ?<br />
Thanks<br />
ny</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Syed</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-164409</link>
		<dc:creator>Syed</dc:creator>
		<pubDate>Tue, 09 Sep 2008 19:55:34 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-164409</guid>
		<description>Looks like getters are always faster than direct access..

Direkt: 2496 42000000000
Getter: 2490 42000000000


java version &quot;1.6.0_10-rc&quot;
Java(TM) SE Runtime Environment (build 1.6.0_10-rc-b28)
Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)</description>
		<content:encoded><![CDATA[<p>Looks like getters are always faster than direct access..</p>
<p>Direkt: 2496 42000000000<br />
Getter: 2490 42000000000</p>
<p>java version &#8220;1.6.0_10-rc&#8221;<br />
Java(TM) SE Runtime Environment (build 1.6.0_10-rc-b28)<br />
Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Functional design patterns and cargo cult blogging at Stephans Blog</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-161472</link>
		<dc:creator>Functional design patterns and cargo cult blogging at Stephans Blog</dc:creator>
		<pubDate>Thu, 04 Sep 2008 13:40:11 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-161472</guid>
		<description>[...] Productivity in software development           &#171; Direct access 300 times faster in Java? [...]</description>
		<content:encoded><![CDATA[<p>[...] Productivity in software development           &laquo; Direct access 300 times faster in Java? [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-160806</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Wed, 03 Sep 2008 17:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-160806</guid>
		<description>:-)</description>
		<content:encoded><![CDATA[<p>:-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nlotz</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-160693</link>
		<dc:creator>nlotz</dc:creator>
		<pubDate>Wed, 03 Sep 2008 15:02:39 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-160693</guid>
		<description>Holy crap ... are you trying to tell me, that our applications won&#039;t run 300 times faster after getting rid of those pesky Getters and Setters ? What am I supposed to tell management, now ? After all, they might even cancel my promotion to CGNSO (Chief Getter &#039;n Setter Optimizer) ...</description>
		<content:encoded><![CDATA[<p>Holy crap &#8230; are you trying to tell me, that our applications won&#8217;t run 300 times faster after getting rid of those pesky Getters and Setters ? What am I supposed to tell management, now ? After all, they might even cancel my promotion to CGNSO (Chief Getter &#8216;n Setter Optimizer) &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159964</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Tue, 02 Sep 2008 15:22:27 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159964</guid>
		<description>More testing: The JVM seems to optimize the mod (%) call. 

int NO = 10;
test = objects[i % NO];

is slow

final int NO = 10; 

is much faster.

As is 256 (obviously) compared to 257.

Another interesting tidbit:

The JVM is very fast for NO=1 or NO=2 (one or two test objects), where direct access is 0 or 1 ms for the number of calls on my machine. For NO=3  (three objects) direct access and getters have the same speed (with -server, JDK 1.6.10, Windows XP)</description>
		<content:encoded><![CDATA[<p>More testing: The JVM seems to optimize the mod (%) call. </p>
<p>int NO = 10;<br />
test = objects[i % NO];</p>
<p>is slow</p>
<p>final int NO = 10; </p>
<p>is much faster.</p>
<p>As is 256 (obviously) compared to 257.</p>
<p>Another interesting tidbit:</p>
<p>The JVM is very fast for NO=1 or NO=2 (one or two test objects), where direct access is 0 or 1 ms for the number of calls on my machine. For NO=3  (three objects) direct access and getters have the same speed (with -server, JDK 1.6.10, Windows XP)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159923</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Tue, 02 Sep 2008 13:54:55 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159923</guid>
		<description>Running a version with -server and 

&lt;code&gt;
   Test[] objects = new Test[100];
    for (int i = 0; i &lt; 100; i  ) {
      Test t = new Test();
      t.value = i;
      objects[i] = t;
    }
&lt;/code&gt;

and 

&lt;code&gt;
    test = objects[i % 100];
&lt;/code&gt;

results in

&lt;code&gt;
Direkt: 6140 49500000000
Getter: 6032 49500000000
&lt;/code&gt; on my setup above.

Not sure how much the array access (and mod) masks performance though.

&lt;code&gt;
public class Test {
  public int value = 42;

  public int getValue() {
    return value;
  }

  public static void main(String[] args) {
    Test test = new Test();
    int dummy;
    for (int i = 0; i &lt; 1000000; i  ) {
      dummy = test.value;
      dummy = test.getValue();
    }

    Test[] objects = new Test[100];
    for (int i = 0; i &lt; 100; i  ) {
      Test t = new Test();
      t.value = i;
      objects[i] = t;
    }

    long tDirektStart = System.currentTimeMillis();
    long sum = 0L;
    for (int i = 0; i &lt; 1000000000; i  ) {
      test = objects[i % 100];
      sum  = test.value;
    }

    long tDirekt = System.currentTimeMillis() - tDirektStart;

    sum = 0L;

    long tGetterStart = System.currentTimeMillis();
    for (int i = 0; i &lt; 1000000000; i  ) {
      test = objects[i % 100];
      sum  = test.getValue();
    }

    long tGetter = System.currentTimeMillis() - tGetterStart;

    System.out.println(&quot;Direkt: &quot;   tDirekt   &quot; &quot;   sum);
    System.out.println(&quot;Getter: &quot;   tGetter   &quot; &quot;   sum);
  }
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Running a version with -server and </p>
<p><code><br />
   Test[] objects = new Test[100];<br />
    for (int i = 0; i < 100; i  ) {<br />
      Test t = new Test();<br />
      t.value = i;<br />
      objects[i] = t;<br />
    }<br />
</code></p>
<p>and </p>
<p></code><code><br />
    test = objects[i % 100];<br />
</code></p>
<p>results in</p>
<p><code><br />
Direkt: 6140 49500000000<br />
Getter: 6032 49500000000<br />
</code> on my setup above.</p>
<p>Not sure how much the array access (and mod) masks performance though.</p>
<p><code><br />
public class Test {<br />
  public int value = 42;</p>
<p>  public int getValue() {<br />
    return value;<br />
  }</p>
<p>  public static void main(String[] args) {<br />
    Test test = new Test();<br />
    int dummy;<br />
    for (int i = 0; i < 1000000; i  ) {<br />
      dummy = test.value;<br />
      dummy = test.getValue();<br />
    }</p>
<p>    Test[] objects = new Test[100];<br />
    for (int i = 0; i < 100; i  ) {<br />
      Test t = new Test();<br />
      t.value = i;<br />
      objects[i] = t;<br />
    }</p>
<p>    long tDirektStart = System.currentTimeMillis();<br />
    long sum = 0L;<br />
    for (int i = 0; i < 1000000000; i  ) {<br />
      test = objects[i % 100];<br />
      sum  = test.value;<br />
    }</p>
<p>    long tDirekt = System.currentTimeMillis() - tDirektStart;</p>
<p>    sum = 0L;</p>
<p>    long tGetterStart = System.currentTimeMillis();<br />
    for (int i = 0; i < 1000000000; i  ) {<br />
      test = objects[i % 100];<br />
      sum  = test.getValue();<br />
    }</p>
<p>    long tGetter = System.currentTimeMillis() - tGetterStart;</p>
<p>    System.out.println("Direkt: "   tDirekt   " "   sum);<br />
    System.out.println("Getter: "   tGetter   " "   sum);<br />
  }<br />
}<br />
</code></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dhananjay Nene</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159922</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Tue, 02 Sep 2008 13:54:50 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159922</guid>
		<description>Yep .. confirmed it on both the OSes.. in server mode the difference is massive, not so in client mode.</description>
		<content:encoded><![CDATA[<p>Yep .. confirmed it on both the OSes.. in server mode the difference is massive, not so in client mode.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dhananjay Nene</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159918</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Tue, 02 Sep 2008 13:51:20 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159918</guid>
		<description>Two differences that come to mind (which may or may not but could likely explain the difference especially the latter one) .. (a) OS and (b) the JRE is running in server mode on the ubuntu desktop.</description>
		<content:encoded><![CDATA[<p>Two differences that come to mind (which may or may not but could likely explain the difference especially the latter one) .. (a) OS and (b) the JRE is running in server mode on the ubuntu desktop.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dhananjay Nene</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159915</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Tue, 02 Sep 2008 13:48:25 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159915</guid>
		<description>Here&#039;s what I got on windows XP with a java 1.5 version. CPU is Intel Core2 6300@1.86GHz and 2GB RAM

C:\Documents and Settings\Dhananjay&gt;java Test
Direkt: 4734 42000000000
Getter: 3985 42000000000

C:\Documents and Settings\Dhananjay&gt;java Test
Direkt: 4687 42000000000
Getter: 3969 42000000000

C:\Documents and Settings\Dhananjay&gt;java Test
Direkt: 4672 42000000000
Getter: 3953 42000000000

C:\Documents and Settings\Dhananjay&gt;java -version
java version &quot;1.5.0_09&quot;
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
Java HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode, sharing)</description>
		<content:encoded><![CDATA[<p>Here&#8217;s what I got on windows XP with a java 1.5 version. CPU is Intel Core2 <a href="mailto:6300@1.86GHz">6300@1.86GHz</a> and 2GB RAM</p>
<p>C:\Documents and Settings\Dhananjay&gt;java Test<br />
Direkt: 4734 42000000000<br />
Getter: 3985 42000000000</p>
<p>C:\Documents and Settings\Dhananjay&gt;java Test<br />
Direkt: 4687 42000000000<br />
Getter: 3969 42000000000</p>
<p>C:\Documents and Settings\Dhananjay&gt;java Test<br />
Direkt: 4672 42000000000<br />
Getter: 3953 42000000000</p>
<p>C:\Documents and Settings\Dhananjay&gt;java -version<br />
java version &#8220;1.5.0_09&#8243;<br />
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)<br />
Java HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode, sharing)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dhananjay Nene</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159913</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Tue, 02 Sep 2008 13:41:06 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159913</guid>
		<description>Can you publish your OS info and java -version output</description>
		<content:encoded><![CDATA[<p>Can you publish your OS info and java -version output</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159912</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Tue, 02 Sep 2008 13:40:54 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159912</guid>
		<description>I&#039;ve run it here, identical code

&lt;code&gt;
Windows XP SP2, Java 1.6.03, DualCore2, 6300, 1.86Ghz, 2gb

Direkt: 2312 42000000000
Getter: 2297 42000000000
&lt;/code&gt;

I&#039;ll take a look, perhaps Eclipse / IDEA only used a JRE not a JDK, and the code is faster with the JDK. (Server?) 

5ms for 100.000.000 would be very fast though. Perhaps some server JIT kicks in.

At least that would be significant and people should use more direct access? ;-)</description>
		<content:encoded><![CDATA[<p>I&#8217;ve run it here, identical code</p>
<p><code><br />
Windows XP SP2, Java 1.6.03, DualCore2, 6300, 1.86Ghz, 2gb</p>
<p>Direkt: 2312 42000000000<br />
Getter: 2297 42000000000<br />
</code></p>
<p>I&#8217;ll take a look, perhaps Eclipse / IDEA only used a JRE not a JDK, and the code is faster with the JDK. (Server?) </p>
<p>5ms for 100.000.000 would be very fast though. Perhaps some server JIT kicks in.</p>
<p>At least that would be significant and people should use more direct access? ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159907</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Tue, 02 Sep 2008 13:31:48 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159907</guid>
		<description>@Dhananjay: Interesting.

Not sure why that is the case.</description>
		<content:encoded><![CDATA[<p>@Dhananjay: Interesting.</p>
<p>Not sure why that is the case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Conrad O'Dea</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159904</link>
		<dc:creator>Conrad O'Dea</dc:creator>
		<pubDate>Tue, 02 Sep 2008 13:14:02 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159904</guid>
		<description>Ah yes...the fragile base class problem.  When C   was gaining in popularity in the 90s, trolls on USENET would always throw around the &#039;fragile base class&#039; as one of the reasons why C   was doomed.  Indeed it is when &lt;a href=&quot;http://en.wikipedia.org/wiki/Implementation_inheritance&quot; rel=&quot;nofollow&quot;&gt;implementation inheritance&lt;/a&gt; is used.  It can be coded around but it&#039;s difficult to do properly.  It&#039;s not a problem, though,  when &lt;a href=&quot;http://en.wikipedia.org/wiki/Interface_inheritance&quot; rel=&quot;nofollow&quot;&gt;interface inheritance&lt;/a&gt; is used.</description>
		<content:encoded><![CDATA[<p>Ah yes&#8230;the fragile base class problem.  When C   was gaining in popularity in the 90s, trolls on USENET would always throw around the &#8216;fragile base class&#8217; as one of the reasons why C   was doomed.  Indeed it is when <a href="http://en.wikipedia.org/wiki/Implementation_inheritance" rel="nofollow">implementation inheritance</a> is used.  It can be coded around but it&#8217;s difficult to do properly.  It&#8217;s not a problem, though,  when <a href="http://en.wikipedia.org/wiki/Interface_inheritance" rel="nofollow">interface inheritance</a> is used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dhananjay Nene</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159888</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Tue, 02 Sep 2008 12:39:24 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159888</guid>
		<description>Here&#039;s what I get for the identical code (no changes whatsoever) - there does seem to be a very large difference in performance.

OS : Ubuntu Gutsy Gibbon 7.10
Kernel : 2.6.22-15-generic
CPU : Intel® Core™ Duo CPU T2600 @ 2.16GHz
RAM : 2GB
JVM :
java version &quot;1.6.0_03&quot;
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)

Output of the program 

Run 1 (250 times faster)
Direkt: 5 42000000000
Getter: 1223 42000000000
Run 2 (a little less than 100 times faster)
Direkt: 14 42000000000
Getter: 1333 42000000000
Run 3 (more than 150 times faster)
Direkt: 7 42000000000
Getter: 1216 42000000000</description>
		<content:encoded><![CDATA[<p>Here&#8217;s what I get for the identical code (no changes whatsoever) &#8211; there does seem to be a very large difference in performance.</p>
<p>OS : Ubuntu Gutsy Gibbon 7.10<br />
Kernel : 2.6.22-15-generic<br />
CPU : Intel® Core™ Duo CPU T2600 @ 2.16GHz<br />
RAM : 2GB<br />
JVM :<br />
java version &#8220;1.6.0_03&#8243;<br />
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)<br />
Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)</p>
<p>Output of the program </p>
<p>Run 1 (250 times faster)<br />
Direkt: 5 42000000000<br />
Getter: 1223 42000000000<br />
Run 2 (a little less than 100 times faster)<br />
Direkt: 14 42000000000<br />
Getter: 1333 42000000000<br />
Run 3 (more than 150 times faster)<br />
Direkt: 7 42000000000<br />
Getter: 1216 42000000000</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159859</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Tue, 02 Sep 2008 10:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159859</guid>
		<description>@Ignacio: &quot;The original post is referencing a comparison between java and other languages that show java as 15x faster, but between 1 and 5 times more memory-consuming. Now, leaving apart the fact than CPU cycles are more expensive than RAM (and I would accept this trade-off every time), this benchmark could simply be comparing the size of the JVM and not reflecting a constant ratio of memory usage&quot;

I&#039;m not sure about memory consumtion - the JVM/JDK got better in recent releases. Most of the memory consumtion might be the base JDK classes - as you said - and an empty heap.</description>
		<content:encoded><![CDATA[<p>@Ignacio: &#8220;The original post is referencing a comparison between java and other languages that show java as 15x faster, but between 1 and 5 times more memory-consuming. Now, leaving apart the fact than CPU cycles are more expensive than RAM (and I would accept this trade-off every time), this benchmark could simply be comparing the size of the JVM and not reflecting a constant ratio of memory usage&#8221;</p>
<p>I&#8217;m not sure about memory consumtion &#8211; the JVM/JDK got better in recent releases. Most of the memory consumtion might be the base JDK classes &#8211; as you said &#8211; and an empty heap.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Thomas</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159831</link>
		<dc:creator>Peter Thomas</dc:creator>
		<pubDate>Tue, 02 Sep 2008 09:29:55 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159831</guid>
		<description>Ivan at comment #4 said:

&gt;&gt; Before DHH started flying around the world doing conferences, having RoR on the resume was a good thing. These days, I would consider it a warning sign.

So true.  RoR has been hijacked by these mediocre wannabe programmers who sound like they think Ruby is the coolest thing because &quot;hello world&quot; could be scaffolded in a few minutes.

Especially after the Twitter debacle and Zed Shaw&#039;s &quot;Rails is a Ghetto&quot; rant I think the days of the Ruby hype are over.</description>
		<content:encoded><![CDATA[<p>Ivan at comment #4 said:</p>
<p>&gt;&gt; Before DHH started flying around the world doing conferences, having RoR on the resume was a good thing. These days, I would consider it a warning sign.</p>
<p>So true.  RoR has been hijacked by these mediocre wannabe programmers who sound like they think Ruby is the coolest thing because &#8220;hello world&#8221; could be scaffolded in a few minutes.</p>
<p>Especially after the Twitter debacle and Zed Shaw&#8217;s &#8220;Rails is a Ghetto&#8221; rant I think the days of the Ruby hype are over.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ignacio Coloma</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159824</link>
		<dc:creator>Ignacio Coloma</dc:creator>
		<pubDate>Tue, 02 Sep 2008 08:59:47 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159824</guid>
		<description>The original post is referencing a comparison between java and other languages that show java as 15x faster, but between 1 and 5 times more memory-consuming. Now, leaving apart the fact than CPU cycles are more expensive than RAM (and I would accept this trade-off every time), this benchmark could simply be comparing the size of the JVM and not reflecting a constant ratio of memory usage.

In my opinion, these are random numbers.  We can move to other things.</description>
		<content:encoded><![CDATA[<p>The original post is referencing a comparison between java and other languages that show java as 15x faster, but between 1 and 5 times more memory-consuming. Now, leaving apart the fact than CPU cycles are more expensive than RAM (and I would accept this trade-off every time), this benchmark could simply be comparing the size of the JVM and not reflecting a constant ratio of memory usage.</p>
<p>In my opinion, these are random numbers.  We can move to other things.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lumpynose</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159591</link>
		<dc:creator>lumpynose</dc:creator>
		<pubDate>Mon, 01 Sep 2008 23:44:21 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159591</guid>
		<description>I think we need to spell it out for Alexis ROBERT who doesn&#039;t seem to understand that the Java JIT it transforms

    sum = iTest.getValue();

into

    sum = iTest.value;

Yes, getters and setters are slow if the method/function call is really made.  But in the case of the Java JIT it inlines the code and removes the call.</description>
		<content:encoded><![CDATA[<p>I think we need to spell it out for Alexis ROBERT who doesn&#8217;t seem to understand that the Java JIT it transforms</p>
<p>    sum = iTest.getValue();</p>
<p>into</p>
<p>    sum = iTest.value;</p>
<p>Yes, getters and setters are slow if the method/function call is really made.  But in the case of the Java JIT it inlines the code and removes the call.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Liu</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159566</link>
		<dc:creator>Mike Liu</dc:creator>
		<pubDate>Mon, 01 Sep 2008 22:44:06 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159566</guid>
		<description>For whatever it&#039;s worth, I did my own microbenchmarking slightly differently.  If nothing else, this might add weight to your statements regarding the performance between direct access and getter/setter (I hope).

With the following code, my test result is as follows:
========================================
many objects - getter/setter		4826 ms
one object   - direct access		5293 ms
one object   - getter/setter		4747 ms
many objects - direct access		4911 ms
========================================

Here&#039;s the code:
=Dummy.java===============================
public class Dummy {
	String data;
	public String getData() { return data; }
	public void setData(String data) { this.data = data; }
}
========================================

=DummyRunner.java===========================
import java.util.HashMap;
import java.util.Map;
import java.util.Random;

public class DummyRunner {

	public static final Map TIME_KEEPING = 
		new HashMap();
	public static final int LOOP_SIZE = 1000000;
	public static final Random rand = new 
		Random(System.currentTimeMillis());
	public static final int RANDOM_STRING_SIZE = 12;

	public static void main(String[] args) {
		String temp = &quot;&quot;;
		Dummy d = new Dummy();

		String test1 = &quot;one object   - direct access&quot;;
		printHeading(test1);
		startWatch(test1);
		for (int i = 0; i &lt; LOOP_SIZE; i  ) {
			d.data = randomString();
			temp = d.data;
		}
		stopWatch(test1);

		String test2 = &quot;one object   - getter/setter&quot;;
		printHeading(test2);
		startWatch(test2);
		for (int i = 0; i &lt; LOOP_SIZE; i  ) {
			d.setData(randomString());
			temp = d.getData();
		}
		stopWatch(test2);

		String test3 = &quot;many objects - direct access&quot;;
		printHeading(test3);
		startWatch(test3);
		for (int i = 0; i &lt; LOOP_SIZE; i  ) {
			Dummy d1 = new Dummy();
			d1.data = randomString();
			temp = d1.data;
		}
		stopWatch(test3);

		String test4 = &quot;many objects - getter/setter&quot;;
		printHeading(test4);
		startWatch(test4);
		for (int i = 0; i &lt; LOOP_SIZE; i  ) {
			Dummy d1 = new Dummy();
			d1.setData(randomString());
			temp = d1.getData();
		}
		stopWatch(test4);

		printResult();
	}

	private static String randomString() {
		String randomString = &quot;&quot;;
		for (int i = 0; i &gt; &quot;   testName   &quot;...&quot;);
	}

	private static void stopWatch(String testName) {
		TIME_KEEPING.put(testName, 
			System.nanoTime() - 
			(TIME_KEEPING.get(testName))
		);
	}

	private static void startWatch(String testName) {
		TIME_KEEPING.put(testName, System.nanoTime());
	}
}
========================================

My roundabout way of doing the same test is an attempt to show that VM does its job in a variety of situations, which should be comforting news of Java folks.

Mike</description>
		<content:encoded><![CDATA[<p>For whatever it&#8217;s worth, I did my own microbenchmarking slightly differently.  If nothing else, this might add weight to your statements regarding the performance between direct access and getter/setter (I hope).</p>
<p>With the following code, my test result is as follows:<br />
========================================<br />
many objects &#8211; getter/setter		4826 ms<br />
one object   &#8211; direct access		5293 ms<br />
one object   &#8211; getter/setter		4747 ms<br />
many objects &#8211; direct access		4911 ms<br />
========================================</p>
<p>Here&#8217;s the code:<br />
=Dummy.java===============================<br />
public class Dummy {<br />
	String data;<br />
	public String getData() { return data; }<br />
	public void setData(String data) { this.data = data; }<br />
}<br />
========================================</p>
<p>=DummyRunner.java===========================<br />
import java.util.HashMap;<br />
import java.util.Map;<br />
import java.util.Random;</p>
<p>public class DummyRunner {</p>
<p>	public static final Map TIME_KEEPING =<br />
		new HashMap();<br />
	public static final int LOOP_SIZE = 1000000;<br />
	public static final Random rand = new<br />
		Random(System.currentTimeMillis());<br />
	public static final int RANDOM_STRING_SIZE = 12;</p>
<p>	public static void main(String[] args) {<br />
		String temp = &#8220;&#8221;;<br />
		Dummy d = new Dummy();</p>
<p>		String test1 = &#8220;one object   &#8211; direct access&#8221;;<br />
		printHeading(test1);<br />
		startWatch(test1);<br />
		for (int i = 0; i &lt; LOOP_SIZE; i  ) {<br />
			d.data = randomString();<br />
			temp = d.data;<br />
		}<br />
		stopWatch(test1);</p>
<p>		String test2 = &#8220;one object   &#8211; getter/setter&#8221;;<br />
		printHeading(test2);<br />
		startWatch(test2);<br />
		for (int i = 0; i &lt; LOOP_SIZE; i  ) {<br />
			d.setData(randomString());<br />
			temp = d.getData();<br />
		}<br />
		stopWatch(test2);</p>
<p>		String test3 = &#8220;many objects &#8211; direct access&#8221;;<br />
		printHeading(test3);<br />
		startWatch(test3);<br />
		for (int i = 0; i &lt; LOOP_SIZE; i  ) {<br />
			Dummy d1 = new Dummy();<br />
			d1.data = randomString();<br />
			temp = d1.data;<br />
		}<br />
		stopWatch(test3);</p>
<p>		String test4 = &#8220;many objects &#8211; getter/setter&#8221;;<br />
		printHeading(test4);<br />
		startWatch(test4);<br />
		for (int i = 0; i &lt; LOOP_SIZE; i  ) {<br />
			Dummy d1 = new Dummy();<br />
			d1.setData(randomString());<br />
			temp = d1.getData();<br />
		}<br />
		stopWatch(test4);</p>
<p>		printResult();<br />
	}</p>
<p>	private static String randomString() {<br />
		String randomString = &#8220;&#8221;;<br />
		for (int i = 0; i &gt; &#8221;   testName   &#8220;&#8230;&#8221;);<br />
	}</p>
<p>	private static void stopWatch(String testName) {<br />
		TIME_KEEPING.put(testName,<br />
			System.nanoTime() &#8211;<br />
			(TIME_KEEPING.get(testName))<br />
		);<br />
	}</p>
<p>	private static void startWatch(String testName) {<br />
		TIME_KEEPING.put(testName, System.nanoTime());<br />
	}<br />
}<br />
========================================</p>
<p>My roundabout way of doing the same test is an attempt to show that VM does its job in a variety of situations, which should be comforting news of Java folks.</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daily del.icio.us for August 28th through September 1st &#8212; Vinny Carpenter's blog</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159539</link>
		<dc:creator>Daily del.icio.us for August 28th through September 1st &#8212; Vinny Carpenter's blog</dc:creator>
		<pubDate>Mon, 01 Sep 2008 22:05:33 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159539</guid>
		<description>[...] Direct access 300 times faster in Java? at Stephans Blog - So for the last years people use more often composition not inheritance with Composite Oriented Programming being the extreme [...]</description>
		<content:encoded><![CDATA[<p>[...] Direct access 300 times faster in Java? at Stephans Blog &#8211; So for the last years people use more often composition not inheritance with Composite Oriented Programming being the extreme [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159448</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Mon, 01 Sep 2008 18:44:26 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159448</guid>
		<description>I could reproduce the same result with changing the value each time.

Read the blog post: &lt;i&gt;&quot;I know, micro benchmarking, I’m not sure what the JVM does in this case, inlining, loop unrolling, object removal, virtual methods and all - and it shouldn’t matter because the JVM optimizing getters is the whole point [...]&quot;&lt;/i&gt;

If ... Java ... is ... clever ... enough ... to ... inline .... 90% of getters .... then ... I .... don&#039;t .... care ... how ... Java ... is ... able ... to ... do ... that.

On a more serious note: Because of the sum, Java cannot optimize completly away the for loop. 

More astonishing is this:

&lt;pre&gt;&lt;code&gt;
public class Test implements ITest {
  public int value = 42;

  public int getValue() {
    return getRealValue();
  }
  public int getRealValue() {
    return value;
  }

  public void change() {
    value = (int) System.currentTimeMillis() / 10000;
  }

  public static void main(String[] args) {
    Test test = new Test();
    ITest iTest = test;
    int dummy;
    for (int i=0; i&lt;1000000; i  ) {
      dummy = test.value;
      dummy = iTest.getValue();
    }

    long tDirektStart = System.currentTimeMillis();
    long sum = 0L;
      test = new Test();
    for (int i=0; i&lt;100000000; i  ) {
      sum  = test.value;
    }

    long tDirekt = System.currentTimeMillis() - tDirektStart;

    sum= 0L;
    long tGetterStart = System.currentTimeMillis();
      iTest = new Test();
    for (int i=0; i&lt;100000000; i  ) {
      sum  = iTest.getValue();
    }
    long tGetter = System.currentTimeMillis() - tGetterStart;

    System.out.println(&quot;Direkt: &quot;   tDirekt   &quot; &quot;   sum);
    System.out.println(&quot;Getter: &quot;   tGetter   &quot; &quot;   sum);
  }


}
&lt;/code&gt;&lt;/pre&gt;

with 

&lt;code&gt;
Direkt: 343 4200000000
Getter: 719 4200000000&lt;/code&gt;

And object creation inside the loop (clever object caching):

&lt;code&gt;
Direkt: 1844 4200000000
Getter: 1828 4200000000
&lt;/code&gt;

Microbenchmarks. They just prove that it&#039;s dangerous to say things like &lt;i&gt;&quot;300 times faster&quot;&lt;/i&gt; with an optimizing JIT.</description>
		<content:encoded><![CDATA[<p>I could reproduce the same result with changing the value each time.</p>
<p>Read the blog post: <i>&#8220;I know, micro benchmarking, I’m not sure what the JVM does in this case, inlining, loop unrolling, object removal, virtual methods and all &#8211; and it shouldn’t matter because the JVM optimizing getters is the whole point [...]&#8220;</i></p>
<p>If &#8230; Java &#8230; is &#8230; clever &#8230; enough &#8230; to &#8230; inline &#8230;. 90% of getters &#8230;. then &#8230; I &#8230;. don&#8217;t &#8230;. care &#8230; how &#8230; Java &#8230; is &#8230; able &#8230; to &#8230; do &#8230; that.</p>
<p>On a more serious note: Because of the sum, Java cannot optimize completly away the for loop. </p>
<p>More astonishing is this:</p>
<pre><code>
public class Test implements ITest {
  public int value = 42;

  public int getValue() {
    return getRealValue();
  }
  public int getRealValue() {
    return value;
  }

  public void change() {
    value = (int) System.currentTimeMillis() / 10000;
  }

  public static void main(String[] args) {
    Test test = new Test();
    ITest iTest = test;
    int dummy;
    for (int i=0; i&lt;1000000; i  ) {
      dummy = test.value;
      dummy = iTest.getValue();
    }

    long tDirektStart = System.currentTimeMillis();
    long sum = 0L;
      test = new Test();
    for (int i=0; i&lt;100000000; i  ) {
      sum  = test.value;
    }

    long tDirekt = System.currentTimeMillis() - tDirektStart;

    sum= 0L;
    long tGetterStart = System.currentTimeMillis();
      iTest = new Test();
    for (int i=0; i&lt;100000000; i  ) {
      sum  = iTest.getValue();
    }
    long tGetter = System.currentTimeMillis() - tGetterStart;

    System.out.println("Direkt: "   tDirekt   " "   sum);
    System.out.println("Getter: "   tGetter   " "   sum);
  }

}
</code></pre>
<p>with </p>
<p><code><br />
Direkt: 343 4200000000<br />
Getter: 719 4200000000</code></p>
<p>And object creation inside the loop (clever object caching):</p>
<p><code><br />
Direkt: 1844 4200000000<br />
Getter: 1828 4200000000<br />
</code></p>
<p>Microbenchmarks. They just prove that it's dangerous to say things like <i>"300 times faster"</i> with an optimizing JIT.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexis ROBERT</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159428</link>
		<dc:creator>Alexis ROBERT</dc:creator>
		<pubDate>Mon, 01 Sep 2008 18:27:14 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159428</guid>
		<description>You ... are ... idiot. Don&#039;t you think that javac optimize source code ? Yes ! If you do something like for(int i=0;i&lt;5000000;i  ){} on GCC 4.1 it will bypass this.

get/set WILL be slower that direct access, on every language, everywhere, every time. Maybe not on quantum computing but we&#039;ll die before that :)</description>
		<content:encoded><![CDATA[<p>You &#8230; are &#8230; idiot. Don&#8217;t you think that javac optimize source code ? Yes ! If you do something like for(int i=0;i&lt;5000000;i  ){} on GCC 4.1 it will bypass this.</p>
<p>get/set WILL be slower that direct access, on every language, everywhere, every time. Maybe not on quantum computing but we&#8217;ll die before that :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159411</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Mon, 01 Sep 2008 18:00:53 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159411</guid>
		<description>@Ivan: Then perhaps I should remove RoR from my resume :-)</description>
		<content:encoded><![CDATA[<p>@Ivan: Then perhaps I should remove RoR from my resume :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159410</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Mon, 01 Sep 2008 17:58:20 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159410</guid>
		<description>@Torgny: Exactly. And thanks.</description>
		<content:encoded><![CDATA[<p>@Torgny: Exactly. And thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Torgny Andersson</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159384</link>
		<dc:creator>Torgny Andersson</dc:creator>
		<pubDate>Mon, 01 Sep 2008 16:11:59 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159384</guid>
		<description>Great post, as so many times before!

&quot;If you’ve ever done a serious project in an OO language then you’ll almost certainly have run into the fragile base class problem.&quot;
I&#039;ve heard and read this statement a couple of times. It is so dumb. It like saying &quot;Structural programming is bad. It makes the code so full of deep indentation that you have to scroll horizontally when reading the source code. That&#039;s not a problem if you use GOTOs.&quot;</description>
		<content:encoded><![CDATA[<p>Great post, as so many times before!</p>
<p>&#8220;If you’ve ever done a serious project in an OO language then you’ll almost certainly have run into the fragile base class problem.&#8221;<br />
I&#8217;ve heard and read this statement a couple of times. It is so dumb. It like saying &#8220;Structural programming is bad. It makes the code so full of deep indentation that you have to scroll horizontally when reading the source code. That&#8217;s not a problem if you use GOTOs.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159373</link>
		<dc:creator>Ivan</dc:creator>
		<pubDate>Mon, 01 Sep 2008 15:36:54 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159373</guid>
		<description>Before DHH started flying around the world doing conferences, having RoR on the resume was a good thing.  These days, I would consider it a warning sign.</description>
		<content:encoded><![CDATA[<p>Before DHH started flying around the world doing conferences, having RoR on the resume was a good thing.  These days, I would consider it a warning sign.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anjan bacchu</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159365</link>
		<dc:creator>anjan bacchu</dc:creator>
		<pubDate>Mon, 01 Sep 2008 14:59:50 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159365</guid>
		<description>hi stephan,

  another thing you could have done is to use System.nanoTime(); instead to see how accurate your &quot;microbenchmark&quot; is.

BR,
~A</description>
		<content:encoded><![CDATA[<p>hi stephan,</p>
<p>  another thing you could have done is to use System.nanoTime(); instead to see how accurate your &#8220;microbenchmark&#8221; is.</p>
<p>BR,<br />
~A</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anjan bacchu</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159364</link>
		<dc:creator>anjan bacchu</dc:creator>
		<pubDate>Mon, 01 Sep 2008 14:58:16 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159364</guid>
		<description>hi there,

   keep these posts coming. I know that you&#039;re not the SANITY KEEPER OF THE INTERNET. All the same, if you have time, for those issues that really matter, you can blog just to make the rest of us java developers lives easier.

BR,
~A</description>
		<content:encoded><![CDATA[<p>hi there,</p>
<p>   keep these posts coming. I know that you&#8217;re not the SANITY KEEPER OF THE INTERNET. All the same, if you have time, for those issues that really matter, you can blog just to make the rest of us java developers lives easier.</p>
<p>BR,<br />
~A</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JulioHM</title>
		<link>http://codemonkeyism.com/direct-access-300-times-faster-in-java/comment-page-1/#comment-159354</link>
		<dc:creator>JulioHM</dc:creator>
		<pubDate>Mon, 01 Sep 2008 14:35:05 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/09/01/direct-access-300-times-faster-in-java/#comment-159354</guid>
		<description>Madness?
THIS... IS... JAVA!!!</description>
		<content:encoded><![CDATA[<p>Madness?<br />
THIS&#8230; IS&#8230; JAVA!!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Database Caching 11/62 queries in 0.089 seconds using disk

Served from: codemonkeyism.com @ 2012-05-17 10:22:50 -->
