<?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>benchmarks Archives | Programming Zen</title>
	<atom:link href="https://programmingzen.com/tag/benchmarks/feed/" rel="self" type="application/rss+xml" />
	<link>https://programmingzen.com/tag/benchmarks/</link>
	<description>Meditations on programming, startups, and technology</description>
	<lastBuildDate>Thu, 05 Jun 2008 17:36:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<site xmlns="com-wordpress:feed-additions:1">1397766</site>	<item>
		<title>MagLev handles trees like a monkey</title>
		<link>https://programmingzen.com/maglev-handles-trees-like-a-monkey/</link>
					<comments>https://programmingzen.com/maglev-handles-trees-like-a-monkey/#comments</comments>
		
		<dc:creator><![CDATA[Antonio Cangiano]]></dc:creator>
		<pubDate>Thu, 05 Jun 2008 17:05:32 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[benchmarks]]></category>
		<category><![CDATA[maglev]]></category>
		<category><![CDATA[performance]]></category>
		<guid isPermaLink="false">http://antoniocangiano.com/?p=187</guid>

					<description><![CDATA[<p>Over the past couple of nights, I tried out MagLev on my Mac laptop (Mac OS X Leopard, 2.2GHz, 2GB Ram). While the shootout will provide us with a detailed comparison between MagLev and the other major Ruby implementations (on many tests) I thought I&#x2019;d share my first impressions. MagLev is going to be a fast implementation of Ruby. How many times faster? Well, it depends on the test, and I don&#x2019;t have systematic numbers yet to come up with a geometric mean of the ratios (the shootout will do just that). What I can tell you now though, is </p>
<p>The post <a href="https://programmingzen.com/maglev-handles-trees-like-a-monkey/">MagLev handles trees like a monkey</a> appeared first on <a href="https://programmingzen.com">Programming Zen</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Over the past couple of nights, I tried out <a href="https://ruby.gemstone.com/">MagLev</a> on my Mac laptop (Mac <span class="caps">OS X</span> Leopard, 2.2GHz, 2GB Ram). While the shootout will provide us with a detailed comparison between MagLev and the other major Ruby implementations (on <a href="https://github.com/acangiano/ruby-benchmark-suite/tree/master">many tests</a>) I thought I&#8217;d share my first impressions.</p>
<p>MagLev is going to be a fast implementation of Ruby. How many times faster? Well, it depends on the test, and I don&#8217;t have systematic numbers yet to come up with a geometric mean of the ratios (the shootout will do just that). What I can tell you now though, is that it&#8217;s fast, significantly faster than <span class="caps">MRI</span>. You know that slowness that you&#8217;ve almost come to expect when running a Ruby script? It&#8217;s simply not there with MagLev. And let&#8217;s not forget, that MagLev&#8217;s added value is not limited to performance, in the same way that JRuby&#8217;s integration with Java is a strong selling point.</p>
<p>It&#8217;s not mature, of course, and there are a few things which haven&#8217;t been implemented yet. But it&#8217;s complete enough to run WEBrick and several other small programs I tried. A truly impressive accomplishment if you think about what was achieved in just three months. So let me reassure you that it&#8217;s not vaporware, it&#8217;s real and it&#8217;s fast.</p>
<p>I want to leave you with an example of a non-trivial benchmark. Running the <a href="https://shootout.alioth.debian.org/gp4/benchmark.php?test=binarytrees&#38;lang=ruby">binary-trees test</a> from the Computer Language Benchmarks Game (chosen because it&#8217;s the first test), I obtained the following results:</p>
<div align="center">
<table>
<tr>
<td><span class="caps">PHP</span> 5.2.5</td>
<td>100.603s</td>
</tr>
<tr>
<td>Perl 5.8.8</td>
<td>70.885s</td>
</tr>
<tr>
<td>Ruby 1.8.6</td>
<td>60.089s</td>
</tr>
<tr>
<td>Python 2.5.1</td>
<td>29.908s</td>
</tr>
<tr style="background:lightgreen;">
<td>MagLev</td>
<td>7.673s</td>
</tr>
<tr>
<td>C++ (gcc 4.0.1)</td>
<td>6.265s</td>
</tr>
</table>
</div>
<p></p>
<p>Aside from being much faster than Ruby 1.8.6, MagLev&#8217;s speed is pretty darn close to that of the extremely fast C++ (complied with g++ and all the optimizations), in this specific case.</p>
<p>You can&#8217;t read too much from a single test, especially when we are not comparing different VMs from the same identical script like we&#8217;ll do for the shootout. It&#8217;s impressive nevertheless and it should give you a hint about MagLev&#8217;s speed even when facing non-trivial, non-ad-hoc benchmarks.</p>
<p>The post <a href="https://programmingzen.com/maglev-handles-trees-like-a-monkey/">MagLev handles trees like a monkey</a> appeared first on <a href="https://programmingzen.com">Programming Zen</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://programmingzen.com/maglev-handles-trees-like-a-monkey/feed/</wfw:commentRss>
			<slash:comments>30</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">187</post-id>	</item>
		<item>
		<title>Let&#8217;s create a Ruby Benchmark Suite</title>
		<link>https://programmingzen.com/help-me-create-the-ruby-benchmark-suite/</link>
					<comments>https://programmingzen.com/help-me-create-the-ruby-benchmark-suite/#comments</comments>
		
		<dc:creator><![CDATA[Antonio Cangiano]]></dc:creator>
		<pubDate>Mon, 02 Jun 2008 01:37:00 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[benchmarks]]></category>
		<category><![CDATA[maglev]]></category>
		<category><![CDATA[Ruby Benchmark Suite]]></category>
		<category><![CDATA[shootout]]></category>
		<guid isPermaLink="false">http://antoniocangiano.com/?p=186</guid>

					<description><![CDATA[<p>My previous post about MagLev and the planning of the next Ruby shootout received a lot of attention. MagLev&#x2019;s speed claims have been subject to a lot of skepticism, and many believe that these impressive figures are due to a combination of clever optimization for trivial tests and incompleteness. The skepticism is understandable. There have been very bright people working on alternative VMs for years, and this new product shows up after only 3 months, and claims to be way faster than anything seen before. Except, that it&#x2019;s not entirely new. What makes the fact that they may be onto </p>
<p>The post <a href="https://programmingzen.com/help-me-create-the-ruby-benchmark-suite/">Let&#8217;s create a Ruby Benchmark Suite</a> appeared first on <a href="https://programmingzen.com">Programming Zen</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>My previous post about <a href="https://programmingzen.com/2008/05/31/maglev-rocks/">MagLev and the planning of the next Ruby shootout</a> received a lot of attention. MagLev&#8217;s speed claims have been subject to <a href="https://headius.blogspot.com/2008/06/maglev.html">a lot of skepticism</a>, and many believe that these impressive figures are due to a combination of clever optimization for trivial tests and incompleteness. The skepticism is understandable. There have been very bright people working on alternative VMs for years, and this new product shows up after only 3 months, and claims to be way faster than anything seen before.</a></p>
<p>Except, that it&#8217;s not entirely new. What makes the fact that they may be onto something and develop a faster implementation credible, is that they are leveraging decades worth of Smalltalk experience, where the Smalltalk VMs underwent similar development challenges. Ruby and Smalltalk are family, there is not inherent reason why Ruby has to be dramatically slower than certain Smalltalk implementations. Parsing and compiling Ruby code into &#8220;smalltalk-ish&#8221; bytecode is not the hardest thing to do. So, from a certain prospective, MagLev is 30 years old, not 3 months old. I&#8217;m enthusiastic about the VM because I think MagLev is promising, but don&#8217;t let people tell you that I&#8217;m naive. Despite the fact that MagLev is incomplete, I want to challenge it so that we verify and clarify what kind of speed improvements are really offered at this stage. Let&#8217;s investigate how.</p>
<p>One very valid point that was raised by several people both in my comment section and on Slashdot, is the fact that many of the benchmarks that have been employed so far are not very useful. Some of them are meaningless, not because of the usual &#8220;micro-benchmark must be taken with a grain of salt&#8221; sound logic, but rather because they offer an opportunity for VMs to optimize them out. When a lazy/smart VM realizes that a given loop doesn&#8217;t produce any results which will be used in some way, it&#8217;ll just skip it, giving us the impression of being many, many times faster than the standard Ruby 1.8 implementation by Matz et al.</p>
<p>In the real world, when that loop has to do something meaningful and the results of the computation have to be printed on the screen, that impressive performance is nowhere to be seen. So far this set of tests, which were employed by Yarv for testing its own progress, have also been used to compare different implementations (and these benchmarks can be found in Rubinius&#8217; repository as well). This was the easy thing to do, but if we&#8217;re going to get serious about it, we need to produce a better set of benchmarks, especially when the current ones question both Yarv and MagLev&#8217;s impressive results.</p>
<p>In the long run, it would be good to come up with some serious benchmarks based on AST nodes in order to test each of Ruby&#8217;s features. We can work on that, but let&#8217;s get started with some &#8220;beefed up&#8221; micro-benchmarks for the imminent shootout. In one of my comments I wrongly called the Yarv tests &#8220;standard&#8221;. That was unfortunate wording, because there are no &#8220;standard&#8221; benchmarks that we can rely on even minimally in the Ruby community. Let&#8217;s fix that.</p>
<p>I created an empty project on GitHub, called <a href="https://github.com/acangiano/ruby-benchmark-suite/tree/master">Ruby Benchmark Suite</a>. This project will hold a set of benchmarks that VM implementers can use to monitor their own progresses and that I can use to run periodical shootouts between all of the major implementations.<del datetime="2008-06-02T05:35:35+00:00"> I also created a <a href="https://acangiano.lighthouseapp.com/projects/12109-ruby-benchmark-suite/overview">Lighthouse project</a>, so that we can have some support for communication and project management.</del> For on going discussion about the project, I created <a href="https://groups.google.com/group/ruby-benchmark-suite">a public Google Group</a> which I invite you to join, if you&#8217;re interested in helping out. I&#8217;d like to see VM implementers get involved with this, in order to make it a set of reasonable, standard benchmarks that we can all agree upon.</p>
<p>For the next shootout, I&#8217;d like to start my multiple testing within the next week or two. So it&#8217;d be great if we could come up with a bunch of new tests and revisit the existing ones. What I&#8217;d like to see is the following:</p>
<ul>
<li>Eliminate or modify flawed tests from the Yarv collection of benchmarks. That means, remove the chance that a given VM could optimize out the actual computing, yielding surprising yet useless results;</li>
<li>Focus on a multitude of simple, cross-platform programs that employ the Core and Standard libraries. These small programs should test a variety of operations (e.g. number crunching, text processing, etc&#8230;);</li>
<li>There can be several types of application benchmarks, from simple algorithms to a program that performs statistical analysis of a large web server log file (for example) &mdash; and anything in between;</li>
<li>The code in the project will be released under the MIT license. That means that if you contribute code that it&#8217;s not your own, you need to ensure that it&#8217;s released under a compatible license before we can include it. You&#8217;re free to place your name and copyright note at the top of the file, in a comment, but if you send it to us, you agree to release it under the MIT license.</li>
<li>If you&#8217;re not too familiar with GitHub, send over your programs by email (acangiano (at) gmail.com) or by submitting them to the Google Group (assuming they are small). Please specify whether you&#8217;d like a &#8220;Submitted by&#8221; line and if you want your email to be included.</li>
<li>Not all contributions that we receive will be included, but the greater the variety, the smaller the gap between the benchmarks and real world performances will be.</li>
</ul>
<p>I hope I can count on your help for this project.</p>
<p>The post <a href="https://programmingzen.com/help-me-create-the-ruby-benchmark-suite/">Let&#8217;s create a Ruby Benchmark Suite</a> appeared first on <a href="https://programmingzen.com">Programming Zen</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://programmingzen.com/help-me-create-the-ruby-benchmark-suite/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">186</post-id>	</item>
	</channel>
</rss>
