Ruby on Rails, Io, Lisp, JavaScript, Dynamic Languages, Prototype-based programming and more...

Technoblog reader special: $10 off web hosting by FatCow!

Wednesday, August 23, 2006

Title Match of the Century: Speed of Development vs. Speed of Computation

It is entertaining to read the comments people have about Starfish over on Reddit:
If your task is intensive enough to warrant parallelization, it is intensive enough to warrant investigating faster languages. Ruby is good for a lot of things, but if my choice is between throwing more processors at the problem or finding a better solution I will go for the better solution every time.

Interesting point, not that he is right, but what he omits gives me pause. The vast majority of the comments where people talking about Ruby being 1000 times slower than their language, but they give no consideration at all to the most striking aspect of Starfish (in my opinion): I can do relatively advanced distributed programming in 6 lines of code.

I'll say it again because it is important. 6 lines of code.

With hardly more than a flick of my wrist, I can parallelize a task and get performance gains of 10, 20, 30 times, whatever I need. In less than a minute, I can write code that will go through a 10Gb log file grepping for a string and parsing that information, collecting that information and wait for new lines to process on demand, in a distributed system that can work over N machines.

I have written much simpler processes in faster languages like C and it takes me hours and hours, not only for writing the hundreds of lines of code but for debugging the darn thing. If I was tasked with creating a distributed log parser in C that did something non-trivial with each line of the log, it could take me a week and it still wouldn't be right.

I work at startups. I don't work for banks, I don't work for Microsoft, I don't work for enterprise. Can I, as a head programmer at a startup, afford over 80 hours of my time writing a log parser in C because it could be 1000 times faster? Not if my startup wants to succeed. Can Microsoft afford to have one of its tens of thousands of programmers spend the time to do that? Of course.

Starfish can and does, on a daily basis, parallelize and speed up what would have otherwise been a slower process. It does so with almost no code.

A few minutes and N times faster than a regular ruby script, or a few weeks and N times faster than a regular ruby script. I know which I choose, and it works extremely well for us. I am always a fan of the right tool for the right purpose. I know that Starfish is not always the right tool, but it is amazing how quickly people discount a tool without considering all of the issues involved. It is not always about processing power. Man hours saved can be much more valuable than a few extra orders of magnitude in processor power.

You should follow me on twitter here.

Technoblog reader special: click here to get $10 off web hosting by FatCow!


Blogger Reginald Braithwaite said...

...and besides, sooner or later Matz is going to get fed up with the performance talk and make Ruby FAST.

When that happens, all of the existing Ruby programs will get faster for FREE. See the Java VM's history for an example of how this works.

There is nothing inherently slow about Ruby the language, the bottleneck is Ruby the implementation. The implementation can always be fixed. There are no fixes for Blub-like langauges (see the hack that is type erasure for an example).

8:37 AM, August 24, 2006

Anonymous Anonymous said...

Some people want to fly a fighter jet to shop at the local supermarket.

Even if Google made MapReduce available to the public I'm sure smart developers would create ruby, perl, or python bindings to really take advantage of it.

Your post says it all. Rock on!

1:14 PM, August 24, 2006

Anonymous Anonymous said...

You really better be able to code up that thing that is 1,000 times faster in a jiffy, too. With Amazon EC2, I can now buy an hour on 1,000 pretty beefy servers for about $100.

12:40 PM, August 25, 2006

Anonymous Anonymous said...

Ruby on Rails is already easy to code fast and with Ragel can be made faster.

1:13 PM, August 28, 2006

Anonymous Anonymous said...

"There are no fixes for Blub-like langauges"

Huh? Ruby is a blub language to Haskell, Lisp, OCaml, Smalltalk programmers.

1:11 PM, November 10, 2006

Anonymous Anonymous said...

I'm the author of that quote. Although I do think Ruby could be faster (what couldn't?), I do know that the 1000 times figure is nowhere near the average.

My point was that parallelization is not a panacea. That you can solve a problem through parallelization instead of a better implementation does not mean you should. Having easy access to it in a way makes using it more difficult to use correctly as it is often a potential solution to problems that can also be - possibly more appropriately - solved through optimization.

For the record though, I don't work for a bank either. I don't work for Microsoft or in the enterprise. At the moment I don't even develop software professionally (working on that one).

I agree that spending a ton of time to re-implement an easily distributed solution as a difficult C-based algorithm is a waste of developer time, but spending a couple of hours to improve your hll code seems to usually be worth it.

8:35 PM, November 13, 2006

Blogger Lucas Carlson said...

First of all, where is your 1000x number coming from, the average speed difference between ruby and c++ in the great language shootout is 150x... an order of magnitude smaller. Second is that you can easily embed C code inline with your ruby to handle the speed intensive parts. Third is that Starfish isn't meant to make the fastest program on earth, it is meant to assist speeding up and distributing tasks that are already written in Ruby. That means that you take your existing code base that you already wrote in Ruby and get it to run faster for free... it is hard to beat faster for free.

10:14 PM, November 13, 2006

Anonymous Anonymous said...

The 1000x number came from your post. Thinking about it now I have no idea why I commented on it.

I didn't know you could embed C code in Ruby (I am mostly a Python programmer). Neat stuff.

I don't agree that you are getting speed increases "for free". The increased performance you get through distributing your task has some conditions on it; namely that you are now required to support more equipment and that the performance is only available for certain types of applications.

The point I was really trying to drive at (and probably doing a poor job of doing so) is that there is a difference between solving a problem and making it disappear. In some cases (and only some) parallelization will do the latter and not the former. Obviously there are times when either method is valuable and time when either is the absolute worst solution.

Mostly, I wanted to explain that point, which obviously represents a change in my thinking over the last two months.

By the way, nice work with starfish. Regardless of opinions or philosophy parallelization with a few bits of code is just plain cool. I should learn to stay out of the peanut gallery and do something more useful with my time.

11:13 PM, November 13, 2006

Anonymous Anonymous said...

I work for startups, too, and I am a big fan of Ruby. I do Rails development.

However, our main product consists of desktop software which includes rich and intensive user interfaces. I would like to do this in Ruby, but I can't. Why?

There is no visual interface builder in Ruby like there is in Visual Studio .NET or Delphi. No matter which GUI toolkit I use in Ruby, making complex GUI interfaces is slower in Ruby than in VS .NET or Delphi. And later this year, with the release of the final XAML/WPF extension for Visual Studio .NET, this gap will get a lot wider.

I can save development time writing the program's algorithms in Ruby, and then that time is wasted anyway when developing the user interface in Ruby.

Perhaps you will say "develop the GUI in VS .NET and the algorithms in Ruby". Unfortunately, this is just another method for wasting time.

Another problem is that we distribute our software, and it's not open source. Ruby doesn't offer me a way to really compile to a bytecode which is a bit hard to reverse engineer. The compilers I seen for Ruby just extracts my source code to disk, to a temporary directory, and executes it.

This way our competitors have a very easy way to see our source code and even steal parts of it.

So, my conclusion is that I work for startups, and this is why I can't use Ruby. :(

5:04 AM, January 28, 2007

Anonymous Anonymous said...

i buy my hydrocodone at buy hydrocodone - can't find any cheaper

7:45 AM, January 28, 2007

Blogger Unknown said...

chung cư tháp doanh nhân
tháp doanh nhân / tháp doanh nhân hà đông / dự án tháp doanh nhân hà đông / chung cư the legend / chung cư the legend 109 nguyễn tuân
chung cư 360 giải phóng / dự án 360 giải phóng / chung cư vietracimex / chung cư 201 minh khai / chung cư thanh xuân tower / chung cư 35 lê văn thiêm
chung cư eco green city / chung cu eco green city / chung cư eco green city nguyễn xiển / chung cu eco green city nguyen xien / eco green city / eco green city nguyễn xiển / dự án eco green city / toà ct4 eco green city / toà ct3 eco green city / toà ct1 eco green city

11:07 AM, May 21, 2016

Anonymous Anonymous said...

michael kors outlet clearance
tiffany jewelry
tiffany jewelry
swarovski crystal
ralph lauren polo
ralph lauren,polo ralph lauren,ralph lauren outlet,ralph lauren italia,ralph lauren sito ufficiale
tiffany and co jewelry
ferragamo shoes
hollister uk
ferragamo shoes
kobe shoes
asics,asics israel,asics shoes,asics running shoes,asics israel,asics gel,asics running,asics gel nimbus,asics gel kayano
tiffany and co
toms outlet
cheap ray ban sunglasses
polo ralph lauren
cheap mlb jerseys
true religion sale
cheap jordan shoes
ralph lauren uk
polo ralph lauren
michael kors outlet online
mont blanc pens
rolex watches
ray-ban sunglasses
longchamp outlet
louis vuitton handbags
iphone case
burberry outlet online
juicy couture outlet
christian louboutin uk
omega watches
true religion jeans outlet
ferragamo shoes
bottega veneta outlet

6:05 PM, May 30, 2016

Blogger chenmeinv0 said...

canada goose jackets
ugg canada
michael kors outlet online
uggs outlet
nike roshe run shoes
true religion jeans
ray ban glasses
hogan sito ufficiale
true religion
ralph lauren polo

10:22 PM, January 03, 2017

Blogger Đào Duy Quang Blog said...

Tọa lạc tại vị trí đắc địa Chung cư 378 Minh Khai được mệnh danh là " Viên Ngọc" giữa lòng thành phố với vị trí không thể thuận tiện hơn tại nút giao thông huyết mạch nối liền các trung tâm Chính trị, Văn hóa,Trường học, Bệnh viện, Sân gold của thủ đô Hà Nội

Dự án Green Pearl tọa lạc tại số 378 Minh Khai , Hai Bà Trưng, Hà Nội là một vị trí đắc địa thuộc cửa ngõ phía Nam của Thủ đô, nơi tập trung các tuyến giao thông huyết mạch của TP Hà Nội (Đường Minh Khai - Cầu Vĩnh Tuy). Dự án bao gồm nhà ở liền kề, biệt thự và căn hộ cao cấp Green Pearl mở ra không gian sống xanh, trong lành, KHÔNG ồn ào, KHÔNG khói bụi ngay trong lòng đô thị.

Dự án 378 Minh Khai hiểu rõ vui chơi là hình thức tốt nhất giúp trẻ phát triển tư duy. Từ đó chúng tôi xây dựng trường học hiện đại, khu vui chơi trẻ em với những trò vui chơi giải trí, trí tuệ giúp trẻ phát triển cả tư duy sáng tạo và thể chất.

Chung cư Green Pearl
Chung cư Green Pearl Không chỉ là giải pháp đáp ứng nhu cầu nhà ở chất lượng cao, sứ mệnh của Green Pearl là cùng bạn trải nghiệm cuộc sống" bình yên trọn vẹn "tách biệt với cuộc sống ngột ngạt ồn ào bên ngoài. Không gian yên tĩnh trong lành được khai thác tối đa trên những con đường tản bộ xanh mát sẽ giúp bạn cảm thấy thư thái nhằm tái tạo năng lượng hiệu quả nhất.
Mặt bằng chung cư Green Pearl
Tiện ích chung cư Green Pearl
Giá bán chung cư Green Pearl
Chung cư Green Pearl

8:18 PM, January 12, 2018

Anonymous aquí está la página friv said...

Thanks for your article! I have been looking for quite a long time and fortunately I read this article! I wish you would continue to have valuable articles like this or more to share with everyone.

1:47 AM, March 27, 2018

Blogger Joya said...

given article is very helpful and very useful for my admin, and pardon me permission to share articles here hopefully helped :

Cara mengobati jantung bengkak
Cara mengobati keputihan sampai tuntas
Obat gagal ginjal akut tradisional
Obat darah tinggi ampuh
Agen ace maxs tanjung pandan
Cara menurunkan asam lambung
Cara menghentikan pendarahan rahim

8:22 PM, June 07, 2018

Blogger Unknown said...

coach factory outlet
polo ralph lauren
adidas shoes
michael kors outlet online
pandora charms outlet
oakley sunglasses wholesale
nfl jerseys
canada goose jackets
nike outlet

7:10 PM, July 15, 2018

Blogger Đào Duy Quang Blog said...

Vincity Gia Lâm
Vincity Ocean Park
Vincity Ocean Park Gia Lâm
Tiện ích Vincty ocean Park
Mặt bằng vincity Ocean Park
Giá bán Vincity Ocean Park
Thiết kế vincity Ocean Park Gia Lâm
Vinhomes Ocean Park
Liền kề Oean Park
Biệt thự Vinhomes Ocean Park
Shophouse Vinhomes Ocean Park
Biệt thự Ocean Park
Vincity Đại Mỗ
Vincity Tây Mỗ

2:09 AM, September 13, 2018

Blogger نور الهدى said...

مكافحة صراصير بالمدينة المنورة
مكافحة الصراصير بالاحساء مكافحة الصراصير بالاحساء
مكافحة الصراصير بالدمام مكافحة الصراصير بالدمام

مكافحة البق الدمام مكافحة البق الدمام

مكافحة الفئران بالمدينة المنورة مكافحة الفئران بالمدينة المنورة
مكافحة الفئران بالاحساء مكافحة الفئران بالاحساء
مكافحة الفئران بالدمام مكافحة الفئران بالدمام
مكافحة النمل الابيض بالدمام مكافحة النمل الابيض بالدمام

8:58 AM, December 08, 2018

Blogger eric yao said...

Coach Factory Coach Factory Outlet Coach Outlet Online Fila Outlet Balenciaga Shoes Cheap Kate Spade Handbag Kate Spade Outlet Air Max Tn Plus Nike Air Max
Victoria Secret Outlet

11:31 PM, January 22, 2019

Blogger Cipro said...

Sono davvero impressionato dalle tue capacità di scrittura e dal layout del tuo weblog. È un tema a pagamento o lo hai personalizzato tu stesso? In entrambi i casi, mantieni alta la qualità della scrittura. Grazie.

Considerato un gioco totalmente gratuito, Friv può essere molto facile da giocare. La cosa buona dei giochi Friv può anche essere che parla a tutti i bambini di età superiore agli 8 anni e alle persone e agli adolescenti. I giochi Friv includono diversi giochi friv online che sono giochi online gratuiti facili da giocare. Le attività di Friv non richiedono la registrazione mentre vengono svolte diverse attività. È stato affermato che i giochi Friv aiutano ad aumentare le capacità e la concentrazione dei bambini. Grazie!

2:33 AM, January 25, 2019

Blogger samaher said...

ان الرشيد تقدم افضل الخدمات الحديثة التى تعمل على تحسين خدمات نقل العفش المتميز لتسهل على العميل اعمال
نقل عفش الكويتالتى يحتاجها ونقدمها باسعار متميزة ومتطورة اتصل بنا الان للحصول على افضل الخدمات لاننا

2:41 PM, January 27, 2019

Anonymous Henry Gregory said...

facetime for windows download: The jumps of technology, usually the one thing that's seen sure shooter progress is your online communication. Distant calling, video calling, and calling all have been made available in one single package.

download imessage for windows grants you to text messages more quickly. This is authoritatively accessible for the Windows 8, Windows 10, Windows 8.1.

I understand most of you are thinking what could you really do with garageband for windows download? Is garage ring totally free for PC?

3:55 AM, February 07, 2019

Blogger ahmed said...

النمل الأبيض من أشكال الحشرات التي لها الكثير من الأضرار المتغايرة والتي يبحث الجميع عن الأساليب المتوفرة كي يتم التخلص منه و القضاء عليه على نحو ختامي , من المعلوم أن هناك الكثير من أشكال الحشرات التي لها الكثير من الأضرار قبل المنافع التي تحققها للإنسان , شركة مكافحة حشرات بالمجمعة
شركة رش مبيدات بالمجمعة
ما معنى مبيد حشري جهازي
شركة الانوار لمكافحة الحشرات

2:45 AM, March 12, 2019

Blogger samaher said...

شركة نقل عفش من الرياض الى الدمام الاحساء الخبر

افضل شركة نقل عفش من الرياض الى جدة


3:02 PM, April 28, 2019

Blogger steve said...

شكرا معلومات مفيدة يمكنك زيارة ايضا لمعلومات قيمة اخرى قم بزيارة :

شركة تنظيف خزانات بالمدينة المنورة
افضل شركة تنظيف

1:21 PM, July 08, 2019

Blogger hằng vũ said...

I am very interested in this post, everyone should know it more, wish you success. The author of this post is admirable, it brings a lot of emotion to everyone reading it, let's share it more widely.
free friv Games 2019, Jogos de Friv, friv for school free Games, cá koi mini

11:55 AM, July 19, 2019

Blogger pubg mobile said...

Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well.
I wanted to thank you for this websites! Thanks for sharing. Great websites!

Pubg APK

Pubg mobile APK

3:29 PM, October 28, 2019


Post a Comment

Subscribe to Post Comments [Atom]

<< Home


If you like this blog, you might also like top photography schools.