<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hungry Machine &#187; performance</title>
	<atom:link href="http://blog.hungrymachine.com/category/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hungrymachine.com</link>
	<description>The guys behind LivingSocial</description>
	<lastBuildDate>Sun, 25 Oct 2009 15:08:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>JRuby &#8220;include?&#8221; 2x faster than 1.8.6?</title>
		<link>http://blog.hungrymachine.com/2009/07/07/jruby-include-2x-faster-than-1-8-6/</link>
		<comments>http://blog.hungrymachine.com/2009/07/07/jruby-include-2x-faster-than-1-8-6/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 17:54:08 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[performance]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.hungrymachine.com/?p=2920</guid>
		<description><![CDATA[Its been a few months since I&#8217;ve looked at JRuby and 1.8.6  can be annoying slow at simple things. So this morning I took another look at Ruby1.9 and JRuby.
See gist below:

6.587s (1.8.6) vs. 5.687s (1.9) vs. 3.556s (JRuby 1.4)&#8230; and that&#8217;s just the include method. JRuby is almost 2x 1.8.6 without any optimizations.  I&#8217;ve read [...]]]></description>
			<content:encoded><![CDATA[<p>Its been a few months since I&#8217;ve looked at JRuby and 1.8.6  can be annoying slow at simple things. So this morning I took another look at Ruby1.9 and JRuby.</p>
<p>See gist below:<br />
<script src="http://gist.github.com/142233.js"></script></p>
<p>6.587s (1.8.6) vs. 5.687s (1.9) vs. 3.556s (JRuby 1.4)&#8230; and that&#8217;s just the include method. JRuby is almost 2x 1.8.6 without any optimizations.  I&#8217;ve read this this <a href="http://blog.headius.com/2009/04/how-jruby-makes-ruby-fast.html">awesome article</a> about JRuby perf optimizations, but its unclear which flags are safe to run in a production environment beyond &#8216;&#8211;server&#8217;, which didn&#8217;t seem to impact local testing of a handful of iterations.</p>
<p>Does anyone have Rails benchmarks running nightly comparing 1.8.6 against jruby?  I guess thats a more comprehensive test.</p>
<p>UPDATE:  Eddie guessed PHP was much faster&#8230;  Apparently not.<br />
<script src="http://gist.github.com/142262.js"></script></p>
<p>UPDATE 2: Warren suggested a different method other than include, that would work. (a &#038; [i]).empty?<br />
<script src="http://gist.github.com/142269.js"></script><br />
Interesting to see it much faster on 1.8.6, consistent on JRuby, and slower on 1.9    </p>
<p>UPDATE 3 : Responses to comments from dmilith:  Sorry.The original gist had version numbers, if you look at its history. I put them back.  I do mention &#8211;server above, and even adding warmup to the script, it doesnt appear to impact numbers as all.  But for it to be warmed up, you&#8217;d have to run the benchmark 10k times? Whats an acceptable warmup period?  Also,  &#8211;fast seems strange to me.  Didnt help the numbers as well.</p>
<p>I hate when people say uBenchmarks suck.  The ruby lang specs should include a suite of these types benchmarks as well.  Its important to keep tabs on them to help find route cause when macro performance suites improve/degrade over time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hungrymachine.com/2009/07/07/jruby-include-2x-faster-than-1-8-6/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
