<?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: Holy Shmoly, Ruby 1.9 smokes Python away!</title>
	<atom:link href="http://programmingzen.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/feed/" rel="self" type="application/rss+xml" />
	<link>http://programmingzen.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/</link>
	<description>By Antonio Cangiano, Software Engineer &#38; Technical Evangelist at IBM</description>
	<lastBuildDate>Thu, 09 Sep 2010 03:37:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: roger</title>
		<link>http://programmingzen.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-8386</link>
		<dc:creator>roger</dc:creator>
		<pubDate>Sat, 21 Nov 2009 03:26:41 +0000</pubDate>
		<guid isPermaLink="false">http://antoniocangiano.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-8386</guid>
		<description>for me (windows)
ruby 1.9.1

16.2s

python 2.6
25s

ruby crystalized [1]
4.8s
Enjoy.
-r
[1] http://github.com/rdp/crystalizer</description>
		<content:encoded><![CDATA[<p>for me (windows)<br />
ruby 1.9.1</p>
<p>16.2s</p>
<p>python 2.6<br />
25s</p>
<p>ruby crystalized [1]<br />
4.8s<br />
Enjoy.<br />
-r<br />
[1] <a href="http://github.com/rdp/crystalizer" rel="nofollow">http://github.com/rdp/crystalizer</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jorrit Posthuma</title>
		<link>http://programmingzen.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6679</link>
		<dc:creator>Jorrit Posthuma</dc:creator>
		<pubDate>Sat, 11 Jul 2009 11:32:43 +0000</pubDate>
		<guid isPermaLink="false">http://antoniocangiano.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6679</guid>
		<description>Btw, that means 0.586306 seconds, what is more than 20 times faster than Ruby 1.9!</description>
		<content:encoded><![CDATA[<p>Btw, that means 0.586306 seconds, what is more than 20 times faster than Ruby 1.9!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jorrit Posthuma</title>
		<link>http://programmingzen.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6678</link>
		<dc:creator>Jorrit Posthuma</dc:creator>
		<pubDate>Sat, 11 Jul 2009 11:29:57 +0000</pubDate>
		<guid isPermaLink="false">http://antoniocangiano.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6678</guid>
		<description>A honest Haskel comparison (same algoritm), but it can be a lot faster (as shown by Twey).

fib :: Int -&gt; Int
fib i   &#124; (i == 0) &#124;&#124; (i == 1)  = i
        &#124; otherwise             = fib (i-1) + fib (i-2)
        
fibSeq :: [(Int, Int)]
fibSeq = [ (i, fib i) &#124; i &lt;- [0..36]]

Slim:Desktop jorrit$ ./fib 
[(0,0),(1,1),(2,1),(3,2),(4,3),(5,5),(6,8),(7,13),(8,21),(9,34),(10,55),(11,89),(12,144),(13,233),(14,377),(15,610),(16,987),(17,1597),(18,2584),(19,4181),(20,6765),(21,10946),(22,17711),(23,28657),(24,46368),(25,75025),(26,121393),(27,196418),(28,317811),(29,514229),(30,832040),(31,1346269),(32,2178309),(33,3524578),(34,5702887),(35,9227465),(36,14930352)]
0.586306</description>
		<content:encoded><![CDATA[<p>A honest Haskel comparison (same algoritm), but it can be a lot faster (as shown by Twey).</p>
<p>fib :: Int -&gt; Int<br />
fib i   | (i == 0) || (i == 1)  = i<br />
        | otherwise             = fib (i-1) + fib (i-2)</p>
<p>fibSeq :: [(Int, Int)]<br />
fibSeq = [ (i, fib i) | i &lt;- [0..36]]</p>
<p>Slim:Desktop jorrit$ ./fib<br />
[(0,0),(1,1),(2,1),(3,2),(4,3),(5,5),(6,8),(7,13),(8,21),(9,34),(10,55),(11,89),(12,144),(13,233),(14,377),(15,610),(16,987),(17,1597),(18,2584),(19,4181),(20,6765),(21,10946),(22,17711),(23,28657),(24,46368),(25,75025),(26,121393),(27,196418),(28,317811),(29,514229),(30,832040),(31,1346269),(32,2178309),(33,3524578),(34,5702887),(35,9227465),(36,14930352)]<br />
0.586306</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Real World</title>
		<link>http://programmingzen.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6453</link>
		<dc:creator>Real World</dc:creator>
		<pubDate>Mon, 22 Jun 2009 02:33:54 +0000</pubDate>
		<guid isPermaLink="false">http://antoniocangiano.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6453</guid>
		<description>I develop to get paid.</description>
		<content:encoded><![CDATA[<p>I develop to get paid.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diego Viola</title>
		<link>http://programmingzen.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6305</link>
		<dc:creator>Diego Viola</dc:creator>
		<pubDate>Mon, 01 Jun 2009 07:42:52 +0000</pubDate>
		<guid isPermaLink="false">http://antoniocangiano.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6305</guid>
		<description>lol ruby 1.9 kicks python ass.

[root@diego ~]# time ruby test.rb 
n=0 =&gt; 0                          
n=1 =&gt; 1                          
n=2 =&gt; 1                          
...
n=34 =&gt; 5702887                   
n=35 =&gt; 9227465                   

real    0m15.056s
user    0m14.868s
sys     0m0.086s
[root@diego ~]# time python test.py
n=0 =&gt; 0
n=1 =&gt; 1
n=2 =&gt; 1
...
n=34 =&gt; 5702887
n=35 =&gt; 9227465

real    0m42.697s
user    0m42.107s
sys     0m0.165s
[root@diego ~]#</description>
		<content:encoded><![CDATA[<p>lol ruby 1.9 kicks python ass.</p>
<p>[root@diego ~]# time ruby test.rb<br />
n=0 =&gt; 0<br />
n=1 =&gt; 1<br />
n=2 =&gt; 1<br />
&#8230;<br />
n=34 =&gt; 5702887<br />
n=35 =&gt; 9227465                   </p>
<p>real    0m15.056s<br />
user    0m14.868s<br />
sys     0m0.086s<br />
[root@diego ~]# time python test.py<br />
n=0 =&gt; 0<br />
n=1 =&gt; 1<br />
n=2 =&gt; 1<br />
&#8230;<br />
n=34 =&gt; 5702887<br />
n=35 =&gt; 9227465</p>
<p>real    0m42.697s<br />
user    0m42.107s<br />
sys     0m0.165s<br />
[root@diego ~]#</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://programmingzen.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6293</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Thu, 28 May 2009 13:48:34 +0000</pubDate>
		<guid isPermaLink="false">http://antoniocangiano.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6293</guid>
		<description>Python 2.6.2 is faster and really faster with psyco:

On a Intel Core i7 940 (2.9 Ghz) :

16s for python 2.6.2 without psyco
0.9s with psyco !!!!!</description>
		<content:encoded><![CDATA[<p>Python 2.6.2 is faster and really faster with psyco:</p>
<p>On a Intel Core i7 940 (2.9 Ghz) :</p>
<p>16s for python 2.6.2 without psyco<br />
0.9s with psyco !!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://programmingzen.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6229</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Sat, 16 May 2009 19:28:28 +0000</pubDate>
		<guid isPermaLink="false">http://antoniocangiano.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6229</guid>
		<description>@Vadim,

Multi-processor is the key, but there are many many implementations of stuff that will just lead you down an ultimately blind alley.

For one, I wouldn&#039;t touch anything that furthers Microsoft&#039;s interests.

I develop for my clients, not for sick greed.</description>
		<content:encoded><![CDATA[<p>@Vadim,</p>
<p>Multi-processor is the key, but there are many many implementations of stuff that will just lead you down an ultimately blind alley.</p>
<p>For one, I wouldn&#8217;t touch anything that furthers Microsoft&#8217;s interests.</p>
<p>I develop for my clients, not for sick greed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vadim Fint</title>
		<link>http://programmingzen.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6222</link>
		<dc:creator>Vadim Fint</dc:creator>
		<pubDate>Thu, 14 May 2009 16:56:50 +0000</pubDate>
		<guid isPermaLink="false">http://antoniocangiano.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6222</guid>
		<description>Also. In this task boo+mono is faster than dump C app :):
&lt;pre&gt;
int fib(int n) {
        if (n == 0 &#124;&#124; n == 1) {
                return n;
        } else {
                return fib(n-1) + fib(n-2);
        }
}

int main(char* argv, int argc) {
    int i;
        for (i = 0; i  %d\n&quot;, i, fib(i));
        }
}

./test_fib
0.95s user 0.00s system 99% cpu 0.957 total
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Also. In this task boo+mono is faster than dump C app <img src='http://programmingzen.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> :</p>
<pre>
int fib(int n) {
        if (n == 0 || n == 1) {
                return n;
        } else {
                return fib(n-1) + fib(n-2);
        }
}

int main(char* argv, int argc) {
    int i;
        for (i = 0; i  %d\n", i, fib(i));
        }
}

./test_fib
0.95s user 0.00s system 99% cpu 0.957 total
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vadim Fint</title>
		<link>http://programmingzen.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6218</link>
		<dc:creator>Vadim Fint</dc:creator>
		<pubDate>Thu, 14 May 2009 16:43:31 +0000</pubDate>
		<guid isPermaLink="false">http://antoniocangiano.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6218</guid>
		<description>ruby test_fib.rb
62.25s user 8.15s system 99% cpu 1:10.85 total

python test_fib.py
23.90s user 0.00s system 99% cpu 23.912 total

booi test_fib.boo
1.12s user 0.02s system 99% cpu 1.141 total

(now prepare to be shocked)
booc test_fib.boo; time mono test_fib.exe
0.76s user 0.00s system 99% cpu 0.768 total

test_fib.boo:
&lt;pre&gt;def fib(n as int) as int:
   if n == 0 or n == 1:
      return n
   else:
      return fib(n-1) + fib(n-2)

for i in range(36):
    res = fib(i)
    print &quot;n=${i} =&gt; ${res}&quot;
&lt;/pre&gt;

What I want to say? NEVER try to compare interpreting languages in many-function-call-tasks. Compiled strong typed languages are much better in that case, coz no runtime-detection of types needed. And compiled languages does not need to be complex and heavy to learn. In example above I took &quot;boo&quot; - compileable (you can use booi - iterpreter-like version as well) strong-typed (but you can use non-strong-typed constructs - slower) language with python-like syntax.

As you can see in this traditional fibonacci task boo is 40 times faster than python. And difference will be much more in big apps.

So. Right language for right job.</description>
		<content:encoded><![CDATA[<p>ruby test_fib.rb<br />
62.25s user 8.15s system 99% cpu 1:10.85 total</p>
<p>python test_fib.py<br />
23.90s user 0.00s system 99% cpu 23.912 total</p>
<p>booi test_fib.boo<br />
1.12s user 0.02s system 99% cpu 1.141 total</p>
<p>(now prepare to be shocked)<br />
booc test_fib.boo; time mono test_fib.exe<br />
0.76s user 0.00s system 99% cpu 0.768 total</p>
<p>test_fib.boo:</p>
<pre>def fib(n as int) as int:
   if n == 0 or n == 1:
      return n
   else:
      return fib(n-1) + fib(n-2)

for i in range(36):
    res = fib(i)
    print "n=${i} =&gt; ${res}"
</pre>
<p>What I want to say? NEVER try to compare interpreting languages in many-function-call-tasks. Compiled strong typed languages are much better in that case, coz no runtime-detection of types needed. And compiled languages does not need to be complex and heavy to learn. In example above I took &#8220;boo&#8221; &#8211; compileable (you can use booi &#8211; iterpreter-like version as well) strong-typed (but you can use non-strong-typed constructs &#8211; slower) language with python-like syntax.</p>
<p>As you can see in this traditional fibonacci task boo is 40 times faster than python. And difference will be much more in big apps.</p>
<p>So. Right language for right job.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dinomite.net &#187; Perl, Python and Ruby</title>
		<link>http://programmingzen.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6026</link>
		<dc:creator>Dinomite.net &#187; Perl, Python and Ruby</dc:creator>
		<pubDate>Fri, 17 Apr 2009 07:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://antoniocangiano.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/#comment-6026</guid>
		<description>[...] reading this article comparing the new Ruby 1.9 to it&#8217;s older version and Python, I thought it would be [...]</description>
		<content:encoded><![CDATA[<p>[...] reading this article comparing the new Ruby 1.9 to it&#8217;s older version and Python, I thought it would be [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
