<?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"
	>
<channel>
	<title>Comments on: Ruby vs JRuby Fractal Benchmark</title>
	<atom:link href="http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/</link>
	<description>Random braindumps vaguely related to coding</description>
	<pubDate>Tue, 06 Jan 2009 07:29:37 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Anonymous</title>
		<link>http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-69</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 05 Jul 2007 21:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-69</guid>
		<description>Might it be a good idea to give a lot of credit for the performance to the Java virtual machine.&lt;br/&gt;I'm seeing "Ruby Virtual Machine", but I'd like to see the actual JVM be  given some cudos.  Nothing wrong with taking some pride in all this hard work...</description>
		<content:encoded><![CDATA[<p>Might it be a good idea to give a lot of credit for the performance to the Java virtual machine.<br />I&#8217;m seeing &#8220;Ruby Virtual Machine&#8221;, but I&#8217;d like to see the actual JVM be  given some cudos.  Nothing wrong with taking some pride in all this hard work&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: igouy</title>
		<link>http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-62</link>
		<dc:creator>igouy</dc:creator>
		<pubDate>Sun, 10 Jun 2007 16:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-62</guid>
		<description>Julian Doherty wrote &lt;i&gt;What is really interesting is that JRuby is faster in this case when...&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;and when we ignore jvm startup by measuring elapsed time within the program...&lt;br/&gt;&lt;br/&gt;What is really interesting is that performance measurements come bundled with implicit usage scenarios which may or may not be valid.&lt;br/&gt;&lt;br/&gt;(Those JRuby guys are doing great work!)</description>
		<content:encoded><![CDATA[<p>Julian Doherty wrote <i>What is really interesting is that JRuby is faster in this case when&#8230;</i></p>
<p>and when we ignore jvm startup by measuring elapsed time within the program&#8230;</p>
<p>What is really interesting is that performance measurements come bundled with implicit usage scenarios which may or may not be valid.</p>
<p>(Those JRuby guys are doing great work!)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Oliver Nutter</title>
		<link>http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-61</link>
		<dc:creator>Charles Oliver Nutter</dc:creator>
		<pubDate>Thu, 07 Jun 2007 17:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-61</guid>
		<description>Java benefits from using actual primitive values, so that's not quite a fair comparison to Ruby's everything-is-an-object. But yes, we have a lot more work to do. There may even be a chance we can use primitives in certain situations.</description>
		<content:encoded><![CDATA[<p>Java benefits from using actual primitive values, so that&#8217;s not quite a fair comparison to Ruby&#8217;s everything-is-an-object. But yes, we have a lot more work to do. There may even be a chance we can use primitives in certain situations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A.A.A</title>
		<link>http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-60</link>
		<dc:creator>A.A.A</dc:creator>
		<pubDate>Thu, 07 Jun 2007 13:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-60</guid>
		<description>Just for reference, in Java (1.5 u9) it takes 0.07 seconds in my machine after the second iteration. which is around 100 times faster i think.. well, sure it is a micro benchmark .</description>
		<content:encoded><![CDATA[<p>Just for reference, in Java (1.5 u9) it takes 0.07 seconds in my machine after the second iteration. which is around 100 times faster i think.. well, sure it is a micro benchmark .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian Doherty</title>
		<link>http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-59</link>
		<dc:creator>Julian Doherty</dc:creator>
		<pubDate>Wed, 06 Jun 2007 21:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-59</guid>
		<description>Excellent info Charles. I've included your 2nd comment in the main post.</description>
		<content:encoded><![CDATA[<p>Excellent info Charles. I&#8217;ve included your 2nd comment in the main post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-58</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 06 Jun 2007 19:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-58</guid>
		<description>um, holy cow?  JRuby has practically zero performance penalty?</description>
		<content:encoded><![CDATA[<p>um, holy cow?  JRuby has practically zero performance penalty?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Oliver Nutter</title>
		<link>http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-57</link>
		<dc:creator>Charles Oliver Nutter</dc:creator>
		<pubDate>Wed, 06 Jun 2007 15:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-57</guid>
		<description>FYI, I grabbed the code in question to try it out myself. These are my numbers using JRuby trunk (not really different from RC3), Java 6 server VM on OS X, and the following command line:&lt;br/&gt;&lt;br/&gt;jruby -J-server -J-Djruby.jit.threshold=0 -O fractal.rb&lt;br/&gt;&lt;br/&gt;JRuby:&lt;br/&gt;Ruby Elapsed 6.454000&lt;br/&gt;&lt;br/&gt;Ruby 1.8.6:&lt;br/&gt;Ruby Elapsed 6.971203&lt;br/&gt;&lt;br/&gt;The command line above adds three options:&lt;br/&gt;&lt;br/&gt;-J-server turns on the server VM&lt;br/&gt;&lt;br/&gt;-J-Djruby.jit.threshold=0 sets the JIT threshold to zero, so it will try to compile methods immediately (critically important for this benchmark since the methods are only called once), and -O turns off ObjectSpace, which is pure overhead for us.&lt;br/&gt;&lt;br/&gt;Additionally, if I let the benchmark run ten times, allowing the JVM to optimize it further, I get the following result for JRuby on the tenth iteration:&lt;br/&gt;&lt;br/&gt;Ruby Elapsed 5.629000&lt;br/&gt;&lt;br/&gt;There's a good page in the JRuby Wiki for &lt;a HREF="http://www.headius.com/jrubywiki/index.php/Performance_Tuning" REL="nofollow"&gt;performance tuning JRuby&lt;/a&gt;. The reason this wasn't compiling is twofold: the methods weren't called enough times to trigger the JIT, and the script itself had a "class" definition in it, which the compiler doesn't yet handle.</description>
		<content:encoded><![CDATA[<p>FYI, I grabbed the code in question to try it out myself. These are my numbers using JRuby trunk (not really different from RC3), Java 6 server VM on OS X, and the following command line:</p>
<p>jruby -J-server -J-Djruby.jit.threshold=0 -O fractal.rb</p>
<p>JRuby:<br />Ruby Elapsed 6.454000</p>
<p>Ruby 1.8.6:<br />Ruby Elapsed 6.971203</p>
<p>The command line above adds three options:</p>
<p>-J-server turns on the server VM</p>
<p>-J-Djruby.jit.threshold=0 sets the JIT threshold to zero, so it will try to compile methods immediately (critically important for this benchmark since the methods are only called once), and -O turns off ObjectSpace, which is pure overhead for us.</p>
<p>Additionally, if I let the benchmark run ten times, allowing the JVM to optimize it further, I get the following result for JRuby on the tenth iteration:</p>
<p>Ruby Elapsed 5.629000</p>
<p>There&#8217;s a good page in the JRuby Wiki for <a HREF="http://www.headius.com/jrubywiki/index.php/Performance_Tuning" REL="nofollow">performance tuning JRuby</a>. The reason this wasn&#8217;t compiling is twofold: the methods weren&#8217;t called enough times to trigger the JIT, and the script itself had a &#8220;class&#8221; definition in it, which the compiler doesn&#8217;t yet handle.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Oliver Nutter</title>
		<link>http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-56</link>
		<dc:creator>Charles Oliver Nutter</dc:creator>
		<pubDate>Wed, 06 Jun 2007 15:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/06/07/ruby-vs-jruby-fractal-benchmark/#comment-56</guid>
		<description>I'd guess the code in question simply isn't compiling in JRuby. JRuby only compiles about 50% of methods out there, and a substantially smaller percentage of actual code (since small methods usually compile and large ones usually don't). We haven't focused on completing the compiler for 1.0, but after the release we'll hit it a lot harder. We've got a lot of planned optimizations coming.&lt;br/&gt;&lt;br/&gt;You might get a boost if you make sure you're running under Java 6 with the server VM...but if it's this slow for you right now there's probably some bottleneck in JRuby artificially slowing it down.</description>
		<content:encoded><![CDATA[<p>I&#8217;d guess the code in question simply isn&#8217;t compiling in JRuby. JRuby only compiles about 50% of methods out there, and a substantially smaller percentage of actual code (since small methods usually compile and large ones usually don&#8217;t). We haven&#8217;t focused on completing the compiler for 1.0, but after the release we&#8217;ll hit it a lot harder. We&#8217;ve got a lot of planned optimizations coming.</p>
<p>You might get a boost if you make sure you&#8217;re running under Java 6 with the server VM&#8230;but if it&#8217;s this slow for you right now there&#8217;s probably some bottleneck in JRuby artificially slowing it down.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.260 seconds -->
