<?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: Worlds Apart &#8211; JVMs and CLIs</title>
	<atom:link href="http://robubu.com/?feed=rss2&#038;p=27" rel="self" type="application/rss+xml" />
	<link>http://robubu.com/?p=27</link>
	<description>the weblog of Rob Yates</description>
	<lastBuildDate>Sat, 14 Aug 2010 17:34:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: robubu : Unladen Swallow, a Hummer Hybrid?</title>
		<link>http://robubu.com/?p=27&#038;cpage=1#comment-78654</link>
		<dc:creator>robubu : Unladen Swallow, a Hummer Hybrid?</dc:creator>
		<pubDate>Wed, 21 Oct 2009 00:49:48 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=27#comment-78654</guid>
		<description>[...] the problems inherent in making any dynamic language go faster, namely type inference. I&#8217;ve blogged about this before for Java and the unladen swallow presentation does a good job of explaining all the pitfalls around [...]</description>
		<content:encoded><![CDATA[<p>[...] the problems inherent in making any dynamic language go faster, namely type inference. I&#8217;ve blogged about this before for Java and the unladen swallow presentation does a good job of explaining all the pitfalls around [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robubu - the technical weblog of Rob Yates &#187; Worlds Apart - Why Java needs ahead of time compilation and why C# has it</title>
		<link>http://robubu.com/?p=27&#038;cpage=1#comment-9528</link>
		<dc:creator>robubu - the technical weblog of Rob Yates &#187; Worlds Apart - Why Java needs ahead of time compilation and why C# has it</dc:creator>
		<pubDate>Wed, 02 May 2007 03:00:29 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=27#comment-9528</guid>
		<description>[...] So why can&#8217;t Java programs share memory given that shared libraries are a technology that&#8217;s been in widespread use for at least 25 years? It&#8217;s really for two reasons.  The first is that up until this point there has really been no way to define a shared library in Java i.e. here&#8217;s a bunch of code and here is its external interface. JSR294 (modularity for Java) addresses this point.  The second is that Java has no efficient AOT compilation and so unlike most other statically typed languages it can&#8217;t utilize the traditional OS functions to load and share its libraries. I have belabored this point in the other &quot;Worlds Apart&quot; posts here and here, pointing out that this is a key differentiation for CLI implementations such as .net or mono.  Miguel (mono lead) also has an excellent post that provides a good overview of mono&#8217;s AOT support and the rationale behind it. JSR294 could be designed in such a way to provide for efficient AOT, and I belabor this point here. [...]</description>
		<content:encoded><![CDATA[<p>[...] So why can&#8217;t Java programs share memory given that shared libraries are a technology that&#8217;s been in widespread use for at least 25 years? It&#8217;s really for two reasons.  The first is that up until this point there has really been no way to define a shared library in Java i.e. here&#8217;s a bunch of code and here is its external interface. JSR294 (modularity for Java) addresses this point.  The second is that Java has no efficient AOT compilation and so unlike most other statically typed languages it can&#8217;t utilize the traditional OS functions to load and share its libraries. I have belabored this point in the other &quot;Worlds Apart&quot; posts here and here, pointing out that this is a key differentiation for CLI implementations such as .net or mono.  Miguel (mono lead) also has an excellent post that provides a good overview of mono&#8217;s AOT support and the rationale behind it. JSR294 could be designed in such a way to provide for efficient AOT, and I belabor this point here. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robubu - the technical weblog of Rob Yates &#187; Worlds Apart - C# and Java</title>
		<link>http://robubu.com/?p=27&#038;cpage=1#comment-9054</link>
		<dc:creator>robubu - the technical weblog of Rob Yates &#187; Worlds Apart - C# and Java</dc:creator>
		<pubDate>Fri, 27 Apr 2007 00:52:59 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=27#comment-9054</guid>
		<description>[...] Alex Buckley C# itself is no more or less designed for these analyses than Java. (in response to compilation approaches outlined in Worlds Apart - JVMs and CLIs). [...]</description>
		<content:encoded><![CDATA[<p>[...] Alex Buckley C# itself is no more or less designed for these analyses than Java. (in response to compilation approaches outlined in Worlds Apart &#8211; JVMs and CLIs). [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Wright</title>
		<link>http://robubu.com/?p=27&#038;cpage=1#comment-8521</link>
		<dc:creator>Patrick Wright</dc:creator>
		<pubDate>Fri, 20 Apr 2007 21:31:18 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=27#comment-8521</guid>
		<description>Rob--I believe that when you say &quot;JVMs, on the other hand, use runtime knowledge to decide what to optimize&quot; is only true for some JVMs, and is not required by the JVM spec. In fact, early on the approach was to have JIT-only, but the overhead of JIT&#039;ing all code (even code which ran infrequently) plus other issues (all that compiled code needs to be cached, and the cache managed) meant that other approaches were tried. Mixed-mode, runtime-optimizing compilers, like Hotspot, are one alternative. But there are others--there are not only optimized JITs still being developed, but also AOT compilers (including gcj and Excelsior Jet)--unfortunately in many cases these are buried under IP protection so we don&#039;t know exactly what they are doing. It is true that Sun&#039;s Hotspot&#039;s dynamic-optimization gets the most press because it&#039;s turned out to lead to great performance, although it took a long time. But as with a market economy, where prices tend to stabilize, in the Java world I think it&#039;s the case that performance of these various approaches are within spitting distance of each other. I certainly don&#039;t think that the Java/CLR comparison can be made so easily. Best regards, Patrick</description>
		<content:encoded><![CDATA[<p>Rob&#8211;I believe that when you say &#8220;JVMs, on the other hand, use runtime knowledge to decide what to optimize&#8221; is only true for some JVMs, and is not required by the JVM spec. In fact, early on the approach was to have JIT-only, but the overhead of JIT&#8217;ing all code (even code which ran infrequently) plus other issues (all that compiled code needs to be cached, and the cache managed) meant that other approaches were tried. Mixed-mode, runtime-optimizing compilers, like Hotspot, are one alternative. But there are others&#8211;there are not only optimized JITs still being developed, but also AOT compilers (including gcj and Excelsior Jet)&#8211;unfortunately in many cases these are buried under IP protection so we don&#8217;t know exactly what they are doing. It is true that Sun&#8217;s Hotspot&#8217;s dynamic-optimization gets the most press because it&#8217;s turned out to lead to great performance, although it took a long time. But as with a market economy, where prices tend to stabilize, in the Java world I think it&#8217;s the case that performance of these various approaches are within spitting distance of each other. I certainly don&#8217;t think that the Java/CLR comparison can be made so easily. Best regards, Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pure Danger Tech &#187; Blog Archive &#187; Java 7 Roundup (Apr 18th)</title>
		<link>http://robubu.com/?p=27&#038;cpage=1#comment-8332</link>
		<dc:creator>Pure Danger Tech &#187; Blog Archive &#187; Java 7 Roundup (Apr 18th)</dc:creator>
		<pubDate>Thu, 19 Apr 2007 03:34:40 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=27#comment-8332</guid>
		<description>[...] Rob Yates had an interesting post this week on the difference between the JVM and CLI approach to compilation. Specifically, how does the CLI differ from having a static module system from the start as opposed to the JVM&#8217;s more open dynamic classloader system. Seems like the changes in JSR 294/277 might create a world where you could get the benefits of both. [...]</description>
		<content:encoded><![CDATA[<p>[...] Rob Yates had an interesting post this week on the difference between the JVM and CLI approach to compilation. Specifically, how does the CLI differ from having a static module system from the start as opposed to the JVM&#8217;s more open dynamic classloader system. Seems like the changes in JSR 294/277 might create a world where you could get the benefits of both. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Miller</title>
		<link>http://robubu.com/?p=27&#038;cpage=1#comment-8324</link>
		<dc:creator>Alex Miller</dc:creator>
		<pubDate>Thu, 19 Apr 2007 03:05:54 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=27#comment-8324</guid>
		<description>I believe the JSR 294 proposal (superpackages) specifies that a superpackage (presumably will be linked to a JSR 277 JAM) must be loaded by the same classloader.  Or at least that&#039;s my understanding from the strawman proposal.  So, maybe that will become an option in Java 7.</description>
		<content:encoded><![CDATA[<p>I believe the JSR 294 proposal (superpackages) specifies that a superpackage (presumably will be linked to a JSR 277 JAM) must be loaded by the same classloader.  Or at least that&#8217;s my understanding from the strawman proposal.  So, maybe that will become an option in Java 7.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Yates</title>
		<link>http://robubu.com/?p=27&#038;cpage=1#comment-6543</link>
		<dc:creator>Rob Yates</dc:creator>
		<pubDate>Sat, 31 Mar 2007 01:59:50 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=27#comment-6543</guid>
		<description>Glyn,

so for a module to be able to be AOT&#039;d then as mentioned above classic analysis techniques need to be applicable to Java code.  There are a few &quot;features&quot; in java that make this basically impossible to do.  These are those features that allow code to alter the class hierarchy dynamically at runtime.  Custom Classloaders and javaagents are two such examples (there may be others).  

The classloading rules would therefore need to be changed so that there is only ever one classloader per module.  &lt;a href=&quot;http://www.ikvm.net/&quot; rel=&quot;nofollow&quot;&gt;IKVM&lt;/a&gt; (java for CLI) has &lt;a href=&quot;http://weblog.ikvm.net/CommentView.aspx?guid=4e0b7f7c-6f5d-42a3-a4d6-5d05a99c84ff&quot; rel=&quot;nofollow&quot;&gt;an approach&lt;/a&gt; close to what I think is needed.</description>
		<content:encoded><![CDATA[<p>Glyn,</p>
<p>so for a module to be able to be AOT&#8217;d then as mentioned above classic analysis techniques need to be applicable to Java code.  There are a few &#8220;features&#8221; in java that make this basically impossible to do.  These are those features that allow code to alter the class hierarchy dynamically at runtime.  Custom Classloaders and javaagents are two such examples (there may be others).  </p>
<p>The classloading rules would therefore need to be changed so that there is only ever one classloader per module.  <a href="http://www.ikvm.net/" rel="nofollow">IKVM</a> (java for CLI) has <a href="http://weblog.ikvm.net/CommentView.aspx?guid=4e0b7f7c-6f5d-42a3-a4d6-5d05a99c84ff" rel="nofollow">an approach</a> close to what I think is needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gastromancer</title>
		<link>http://robubu.com/?p=27&#038;cpage=1#comment-6525</link>
		<dc:creator>Gastromancer</dc:creator>
		<pubDate>Fri, 30 Mar 2007 20:32:13 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=27#comment-6525</guid>
		<description>Hmmm.... if Gosling were correct about the importance of hardware optimization, then wouldn&#039;t we see source-code-only distros like gentoo getting significant traction?  Wouldn&#039;t you see Matlab recompiling itself on install?

It&#039;s a very convenient explanation, that there&#039;s lots of optimization you can do, last-minute.  But it requires proof.  And microbenchmarks aren&#039;t proof.</description>
		<content:encoded><![CDATA[<p>Hmmm&#8230;. if Gosling were correct about the importance of hardware optimization, then wouldn&#8217;t we see source-code-only distros like gentoo getting significant traction?  Wouldn&#8217;t you see Matlab recompiling itself on install?</p>
<p>It&#8217;s a very convenient explanation, that there&#8217;s lots of optimization you can do, last-minute.  But it requires proof.  And microbenchmarks aren&#8217;t proof.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dominic Cooney</title>
		<link>http://robubu.com/?p=27&#038;cpage=1#comment-6500</link>
		<dc:creator>Dominic Cooney</dc:creator>
		<pubDate>Fri, 30 Mar 2007 13:58:33 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=27#comment-6500</guid>
		<description>Neil: Gosling is right about the different characteristics of different processors. .NET ahead-of-time compilation actually happens when the bytecode is put onto a particular machine (typically when software is installed), so the compilation can take advantage of the characteristics of the PC&#039;s particular processor. Significant changes to the system cause the cache of native images to be invalidated, and then .NET falls back to runtime JITting.</description>
		<content:encoded><![CDATA[<p>Neil: Gosling is right about the different characteristics of different processors. .NET ahead-of-time compilation actually happens when the bytecode is put onto a particular machine (typically when software is installed), so the compilation can take advantage of the characteristics of the PC&#8217;s particular processor. Significant changes to the system cause the cache of native images to be invalidated, and then .NET falls back to runtime JITting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Bartlett</title>
		<link>http://robubu.com/?p=27&#038;cpage=1#comment-6486</link>
		<dc:creator>Neil Bartlett</dc:creator>
		<pubDate>Fri, 30 Mar 2007 11:01:03 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=27#comment-6486</guid>
		<description>Rob,

Interesting analysis, thanks.

One justifcation I heard for Java&#039;s very late compilation and optimization of bytecode was described by James Gosling in a talk he gave (which I blogged about here: http://neilbartlett.name/blog/2007/03/15/an-evening-with-james-gosling). He said that there is substantial variation between individual processors even within the same line, i.e. the Pentium IV I have in my PC and the Pentium IV you have in your PC, although they share functional compatibility, have very different optimization characteristics. And of course both of them very different from from an AMD chip. Because the JVM compiles as late as possible, it can optimize for the &quot;exact piece of silicon it&#039;s running on&quot; (his words). Whereas if you distribute native binaries then all you can do is optimize for the generic x86 architecture.

Now, I don&#039;t know enough of the low-level details to know whether that&#039;s a valid justification or a load of hot air. I just wanted to point out that there is at least a theoretical advantage in very late compilation, even if it doesn&#039;t translate to a practical advantage.

Neil</description>
		<content:encoded><![CDATA[<p>Rob,</p>
<p>Interesting analysis, thanks.</p>
<p>One justifcation I heard for Java&#8217;s very late compilation and optimization of bytecode was described by James Gosling in a talk he gave (which I blogged about here: <a href="http://neilbartlett.name/blog/2007/03/15/an-evening-with-james-gosling)" rel="nofollow">http://neilbartlett.name/blog/2007/03/15/an-evening-with-james-gosling)</a>. He said that there is substantial variation between individual processors even within the same line, i.e. the Pentium IV I have in my PC and the Pentium IV you have in your PC, although they share functional compatibility, have very different optimization characteristics. And of course both of them very different from from an AMD chip. Because the JVM compiles as late as possible, it can optimize for the &#8220;exact piece of silicon it&#8217;s running on&#8221; (his words). Whereas if you distribute native binaries then all you can do is optimize for the generic x86 architecture.</p>
<p>Now, I don&#8217;t know enough of the low-level details to know whether that&#8217;s a valid justification or a load of hot air. I just wanted to point out that there is at least a theoretical advantage in very late compilation, even if it doesn&#8217;t translate to a practical advantage.</p>
<p>Neil</p>
]]></content:encoded>
	</item>
</channel>
</rss>
