<?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: Merge sort implementation and performance in Scala and Ruby</title> <atom:link href="http://ilyasterin.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html/feed" rel="self" type="application/rss+xml" /><link>http://ilyasterin.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html</link> <description>Against the grain software and startups</description> <lastBuildDate>Thu, 26 Jan 2012 12:50:49 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Ittay</title><link>http://ilyasterin.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-86</link> <dc:creator>Ittay</dc:creator> <pubDate>Sun, 27 Dec 2009 01:24:59 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-86</guid> <description>&lt;p&gt;You&#039;re comparing an implementation with a linked list to one with an array. Why not use Array for the Scala implementation? Also, you&#039;re not giving JIT a chance. Both because of running one sort and because your code runs inside the Application constructor which is not JIT. Try using a regular main and running one sort, then timing another one.&lt;/p&gt; </description> <content:encoded><![CDATA[<p>You&#8217;re comparing an implementation with a linked list to one with an array. Why not use Array for the Scala implementation? Also, you&#8217;re not giving JIT a chance. Both because of running one sort and because your code runs inside the Application constructor which is not JIT. Try using a regular main and running one sort, then timing another one.</p>]]></content:encoded> </item> <item><title>By: Ittay</title><link>http://ilyasterin.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-193</link> <dc:creator>Ittay</dc:creator> <pubDate>Sun, 27 Dec 2009 01:24:00 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-193</guid> <description>&lt;p&gt;You&#039;re comparing an implementation with a linked list to one with an array. Why not use Array for the Scala implementation? Also, you&#039;re not giving JIT a chance. Both because of running one sort and because your code runs inside the Application constructor which is not JIT. Try using a regular main and running one sort, then timing another one.&lt;/p&gt; </description> <content:encoded><![CDATA[<p>You&#8217;re comparing an implementation with a linked list to one with an array. Why not use Array for the Scala implementation? Also, you&#8217;re not giving JIT a chance. Both because of running one sort and because your code runs inside the Application constructor which is not JIT. Try using a regular main and running one sort, then timing another one.</p>]]></content:encoded> </item> <item><title>By: Ilya Sterin</title><link>http://ilyasterin.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-85</link> <dc:creator>Ilya Sterin</dc:creator> <pubDate>Thu, 26 Nov 2009 22:56:05 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-85</guid> <description>&lt;p&gt;Maxim, thanks.  I published an update.  This change was the answer. Ilya&lt;/p&gt; </description> <content:encoded><![CDATA[<p>Maxim, thanks.  I published an update.  This change was the answer. Ilya</p>]]></content:encoded> </item> <item><title>By: Ilya Sterin</title><link>http://ilyasterin.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-192</link> <dc:creator>Ilya Sterin</dc:creator> <pubDate>Thu, 26 Nov 2009 22:56:00 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-192</guid> <description>&lt;p&gt;Maxim, thanks.  I published an update.  This change was the answer. Ilya&lt;/p&gt; </description> <content:encoded><![CDATA[<p>Maxim, thanks.  I published an update.  This change was the answer. Ilya</p>]]></content:encoded> </item> <item><title>By: r4i</title><link>http://ilyasterin.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-84</link> <dc:creator>r4i</dc:creator> <pubDate>Thu, 26 Nov 2009 05:39:52 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-84</guid> <description>&lt;p&gt;I’ve run the Ruby benchmark using the different Ruby interpreters, and I wrapped the loop for benchmark like this: require ‘benchmark’ puts Benchmark.measure{ 3000.times do mergesort(numbers) end } Here’s the promising future of Ruby: $ ruby merge_sort.rb 7.520000 0.520000 8.040000 ( 8.307699) $ ruby1.9 merge_sort.rb 2.830000 0.030000 2.860000 ( 2.951124) $ jruby -J-server merge_sort.rb 4.882000 0.000000 4.882000 ( 4.746000) Cheers.&lt;/p&gt; </description> <content:encoded><![CDATA[<p>I’ve run the Ruby benchmark using the different Ruby interpreters, and I wrapped the loop for benchmark like this: require ‘benchmark’ puts Benchmark.measure{ 3000.times do mergesort(numbers) end } Here’s the promising future of Ruby: $ ruby merge_sort.rb 7.520000 0.520000 8.040000 ( 8.307699) $ ruby1.9 merge_sort.rb 2.830000 0.030000 2.860000 ( 2.951124) $ jruby -J-server merge_sort.rb 4.882000 0.000000 4.882000 ( 4.746000) Cheers.</p>]]></content:encoded> </item> <item><title>By: r4i</title><link>http://ilyasterin.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-191</link> <dc:creator>r4i</dc:creator> <pubDate>Thu, 26 Nov 2009 05:39:00 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-191</guid> <description>&lt;p&gt;I’ve run the Ruby benchmark using the different Ruby interpreters, and I wrapped the loop for benchmark like this: require ‘benchmark’ puts Benchmark.measure{ 3000.times do mergesort(numbers) end } Here’s the promising future of Ruby: $ ruby merge_sort.rb 7.520000 0.520000 8.040000 ( 8.307699) $ ruby1.9 merge_sort.rb 2.830000 0.030000 2.860000 ( 2.951124) $ jruby -J-server merge_sort.rb 4.882000 0.000000 4.882000 ( 4.746000) Cheers.&lt;/p&gt; </description> <content:encoded><![CDATA[<p>I’ve run the Ruby benchmark using the different Ruby interpreters, and I wrapped the loop for benchmark like this: require ‘benchmark’ puts Benchmark.measure{ 3000.times do mergesort(numbers) end } Here’s the promising future of Ruby: $ ruby merge_sort.rb 7.520000 0.520000 8.040000 ( 8.307699) $ ruby1.9 merge_sort.rb 2.830000 0.030000 2.860000 ( 2.951124) $ jruby -J-server merge_sort.rb 4.882000 0.000000 4.882000 ( 4.746000) Cheers.</p>]]></content:encoded> </item> <item><title>By: Maxim</title><link>http://ilyasterin.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-83</link> <dc:creator>Maxim</dc:creator> <pubDate>Thu, 26 Nov 2009 04:57:04 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-83</guid> <description>&lt;p&gt;Try to replace the line #28 while(left.length &gt; 0 &amp;&amp; right.length &gt; 0) { with the following while(left.lengthCompare(0) &gt; 0  &amp;&amp; right.lengthCompare(0) &gt; 0) { Best regards,&lt;/p&gt; </description> <content:encoded><![CDATA[<p>Try to replace the line #28 while(left.length > 0 &amp;&amp; right.length > 0) { with the following while(left.lengthCompare(0) > 0  &amp;&amp; right.lengthCompare(0) > 0) { Best regards,</p>]]></content:encoded> </item> <item><title>By: Maxim</title><link>http://ilyasterin.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-190</link> <dc:creator>Maxim</dc:creator> <pubDate>Thu, 26 Nov 2009 04:57:00 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2009/11/merge-sort-implementation-and-performance-in-scala-and-ruby.html#comment-190</guid> <description>&lt;p&gt;Try to replace the line #28 while(left.length &gt; 0 &amp;&amp; right.length &gt; 0) { with the following while(left.lengthCompare(0) &gt; 0  &amp;&amp; right.lengthCompare(0) &gt; 0) { Best regards,&lt;/p&gt; </description> <content:encoded><![CDATA[<p>Try to replace the line #28 while(left.length &gt; 0 &amp;&amp; right.length &gt; 0) { with the following while(left.lengthCompare(0) &gt; 0  &amp;&amp; right.lengthCompare(0) &gt; 0) { Best regards,</p>]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using memcached

Served from: ilyasterin.com @ 2012-02-09 21:27:51 -->
