From: Logan Capaldo Date: 2006-02-24T08:11:07+09:00 Subject: Re: Huge performance gap --Apple-Mail-1--779707543 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Feb 23, 2006, at 5:55 PM, Alexis Reigel wrote: > Why should that be ridiculous or ignorant? > I stated that I was aware of the differences between interpreted and > compiled languages. But that does not change the fact that I believe > that this does not explain the performance gap. An execution time of > 27.65 seconds against 0.33 seconds is not just nothing is it? It's a > factor of over 80 times. Besides, I implemented the same code in java > too, which isn't native code as well and runs in a virtual machine > too, > and it executed in about the same time as c++. Ruby's method (function) lookup is gonna be slower no matter what because of the typing situation. That's probably the biggest hit here. The C++ code can for the most part turns function calls into jumps at compile time (excluding virtual methods, although even there there is less indirection than ruby). Similarly for Java. Have you tried running it in YARV? --Apple-Mail-1--779707543--