<?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>maglev Archives | Programming Zen</title>
	<atom:link href="https://programmingzen.com/tag/maglev/feed/" rel="self" type="application/rss+xml" />
	<link>https://programmingzen.com/tag/maglev/</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>
		<item>
		<title>MagLev rocks and the planning of the next Ruby shootout</title>
		<link>https://programmingzen.com/maglev-rocks/</link>
					<comments>https://programmingzen.com/maglev-rocks/#comments</comments>
		
		<dc:creator><![CDATA[Antonio Cangiano]]></dc:creator>
		<pubDate>Sun, 01 Jun 2008 01:01:24 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[maglev]]></category>
		<category><![CDATA[shootout]]></category>
		<guid isPermaLink="false">http://antoniocangiano.com/?p=185</guid>

					<description><![CDATA[<p>I&#x2019;m not at RailsConf, which is being held in Portland, but it doesn&#x2019;t take a great leap of faith for me to believe that the session on MagLev was the star of the conference. Avi&#x2019;s demo created quite an echo and it&#x2019;s currently the most discussed topic in the Ruby and Rails communities, despite the announcements of IronRuby on Rails and today&#x2019;s release of Rails 2.1. I had no doubt that this would be the case. For the past few days, and before RailsConf, I&#x2019;ve been in touch with the nice people at Gemstone and witnessed, before most, the speed </p>
<p>The post <a href="https://programmingzen.com/maglev-rocks/">MagLev rocks and the planning of the next Ruby shootout</a> appeared first on <a href="https://programmingzen.com">Programming Zen</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img data-recalc-dims="1" fetchpriority="high" decoding="async" src="https://i0.wp.com/programmingzen.com/wp-content/uploads/2008/05/maglev.gif?resize=223%2C226&#038;ssl=1" alt="MagLev" title="MagLev" width="223" height="226" align="right" />I&#8217;m not at RailsConf, which is being held in Portland, but it doesn&#8217;t take a great leap of faith for me to believe that the session on <a href="https://ruby.gemstone.com/">MagLev</a> was the star of the conference. Avi&#8217;s demo <a href="https://blogsearch.google.ca/blogsearch?hl=en&amp;client=firefox-a&amp;um=1&amp;ie=UTF-8&amp;q=maglev&amp;btnG=Search+Blogs">created</a> <a href="https://blog.obiefernandez.com/content/2008/05/maglev-is-gemst.html">quite</a> <a href="https://summize.com/search?q=maglev">an echo</a> and it&#8217;s currently the most discussed topic in the Ruby and Rails communities, despite the announcements of IronRuby on Rails and today&#8217;s release of Rails 2.1.</p>
<p>I had no doubt that this would be the case. For the past few days, and before RailsConf, I&#8217;ve been in touch with the nice people at Gemstone and witnessed, before most, the speed of the current implementation. My first comment truly was &#8220;Holy Shit!&#8221; and I don&#8217;t like to swear. 😉 In a side-by-side comparison, it was like watching a race between an eight week old chubby bulldog (Ruby MRI) and a full grown jaguar (MagLev). Ruby MRI looked cute, I was almost cheering for it (&#8220;come on Ruby, you can do it&#8221;). It was so spectacular that you couldn&#8217;t help but think that they were pulling your leg.</p>
<p>MagLev is not complete yet, but it&#8217;s very remarkable that it accomplished so much, both in terms of tests passed and its speed &#8211; despite being only three months old. It speaks volume about the capabilities of the Gemstone platform (on which MagLev is based upon) and MagLev&#8217;s team work.</p>
<p>Let&#8217;s be clear about one point, this announcement changes everything; it has the potential to revolutionize the Ruby community. It&#8217;s not just a matter of a substantial speed increase, Ruby&#8217;s main weakness, it&#8217;s also a matter of scalability, paradigm shift and Enterprise perception.</p>
<p>When you get to use an object persistence model that can hold up to 17 Petabytes (that means 17 Million Gigabytes for you), with the ability to scale by simply adding instances, the whole &#8220;Ruby doesn&#8217;t scale&#8221; FUD starts to fade real fast. Also, aside from all the technical advantages brought by MagLev, selling a Gemstone based solution to environments that are typically harder for Ruby to penetrate into, becomes a no-brainer. It&#8217;s a newfound ticket for Ruby and Rails into many sectors of the Enterprise, and an easy entrance in the financial world as well.</p>
<p>MagLev is unconventional, but that&#8217;s because most impressive innovations tend to be so. That&#8217;s what the future looks like when seen through the eyes of the present. The reality is that MagLev&#8217;s OODB paradigm and architecture are quite a good fit for common Web development too, so if properly pulled off, MagLev could change the way we write Rails applications.</p>
<p>A few people objected that it won&#8217;t fly, because it&#8217;s going to be a commercial product. I don&#8217;t think that&#8217;s the case. The Rails community adopts Macs, TextMate, and other commercial software without blinking, so why would they have any issues with paying for a truly superior Ruby VM (if it proves to be so)? The terms of release for MagLev have not been finalized yet, but it&#8217;s clear that some part of it will be open and others (e.g. the actual VM written in C) closed source. It&#8217;s likely that there will be different pricing levels, including a free version with some limits in place. But price will mostly be irrelevant.</p>
<p><strong>Planning the next Great Ruby Shootout</strong></p>
<p>The great news is that the next edition of <a href="https://programmingzen.com/2007/12/03/the-great-ruby-shootout/">my shootout</a> will include MagLev, so we&#8217;ll get to test it in a fair and controlled environment, against all the other major implementations. The results of the shootout will be published sometime in June. These are the implementations that I&#8217;ll most likely test:</p>
<ol>
<li>Ruby MRI</li>
<li>Ruby 1.9</li>
<li>JRuby</li>
<li>Rubinius</li>
<li>MagLev</li>
<li>Ruby Enterprise Edition</li>
<li>IronRuby</li>
<li>IronRuby on Mono</li>
</ol>
<p>I&#8217;ll probably test them on Ubuntu 8.04 (32 and 64 bit), Mac OS X Leopard and Windows Vista (32 bit). Please note that not all eight of them can be tested on each of the four platforms, so you won&#8217;t see MagLev on Windows or Linux 32 bit, for example. I&#8217;d like to test all four operating systems from the same machine (my MacBook Pro Core 2 Duo 2GHz SR, with 2GB of RAM) so that we can also compare how these major implementations behave on different operating systems, but I may have to opt for some native installations and carrying out others from VMware Fusion; I&#8217;ve yet to sort all the details out. 😉</p>
<p>A criticism that I&#8217;ve often heard is that these micro-benchmarks are well known and specifically targeted for speed by the implementations&#8217; authors. The new shootout will also include a set of tests that no one has seen before (I just started to write/put them together). They may still be synthetic benchmarks, but they&#8217;ll help us form a better idea of the actual speed of these VMs.</p>
<p>The post <a href="https://programmingzen.com/maglev-rocks/">MagLev rocks and the planning of the next Ruby shootout</a> appeared first on <a href="https://programmingzen.com">Programming Zen</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://programmingzen.com/maglev-rocks/feed/</wfw:commentRss>
			<slash:comments>25</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">185</post-id>	</item>
	</channel>
</rss>
