22 comments

[ 2.4 ms ] story [ 49.7 ms ] thread
Well done, but why wasn't the compiler doing this automatically?
It takes a very sophisticated compiler to know that rubyobj->isString will always be true when the ruby interpreter is evaluating a constant string.
isString is the cheapest method out there, it just tests a tag bit in the pointer. Pretty much an AND followed by a branch.
... except for setting up the function call, and all that jazz.
The title, which _is_ from the original article is a bit misleading, no?

The performances of the methods he worked have been bumped up 63% in maximum, 8% in average. His patches were applied to Ruby trunk in Oct. 5 this year.

I'm not knocking the kid's contribution, but the title oversells it a bit, implying that the kid improved Ruby 1.9's overall performance, which apparently isn't the case.

That they were using and contributing to an open source project for study was more surprising to me than the details of this improvement.
That appears to be the standard way to present performance improvements. Have a look at any recent announcement of javascript advances or other ruby improvements.

But I agree it's somewhat confusing.

He improved the performance of a few specific methods. Not of Ruby in general.

Google translation of the article referenced in the article: http://translate.google.com/translate?prev=hp&hl=en&... (mostly funny to read, as the translation is quite wacky)

(Bablefish chokes on the site)

The methods he improved the perf of were in string, array, and struct. I think that counts as "globally improves performance", there are very few non-trivial methods that won't benefit.
but they won't improve performance as much. AND the 63% figure was very misleading anyway since that's the best case, and average is only 8%.

So basically, if your program does nothing but call those methods in such a way that it satisfies the best case improvement, it just got 63% faster at doing nothing.

If your program does nothing but call those methods with the average case, it just got 8% faster at doing nothing.

If your program uses anything else, it's probably only faster by a small fraction of that 8%.

>..the 63% figure was very misleading anyway since that's the best case...

Which is exactly what I took "up to 63%" to mean. I don't see that as misleading. If a drug administration company was listing off the side effects of a new over-the-counter drug and mentioned fatality rates we're on average, 2%, but failed to mention that the worst-case scenarios (where the patients were Hispanic females over the age 35) had a 80% fatality rate, would you also consider that misleading? Of course you would.

So why is citing the extremes of a positive considered misleading, while citing extremes of a negative is almost expected?

That's still a very long shot from "[Improving] Ruby 1.9 Performance By Up To 63%", which sounds like a global average improvement of 63% for all Ruby 1.9 programs...
SNORE how's this news..
This is like me taking my son hunting, holding the gun for him and having him pull the trigger for the kill.

His mentor was Koichi Sasada...he wrote YARV!

Don't get me wrong, I think it's great to get kids involved. But it's not like he walked in off the street, "saw the matrix" and then committed a patch.

I can already sense the razzing coming from the Python camp! :)

Can you somehow prove that Koichi made the solution SOOO obvious that even a teenager could have made the fix?

From what little I've read, it seems to me that this kid is pretty smart and has made a very generous contribution to the Ruby community.

I would have been plenty impressed if the article was framed like that, without the hype. As you say, the kid has made a great contribution at a young age. No need to dress up a good thing.
> I can already sense the razzing coming from the Python camp! :)

We've got no need, the CPython release manager is a high school student (he's also a core committer on both CPython and PyPy) :)

"Japanese people were surprised about the news since he made that in his age."

As opposed to most other people, who were not surprised at all?

I agree though, the title implies that he improved all of Ruby's performance... even though it was just several methods. Still cool that he got into this kind of project at a young age, but it's not like he re-wrote a bunch of algorithms or something....

"His mentor was Koichi Sasada (ko1)."

That's the guy who wrote YARV. So it's not too surprising that ko1 would point him in the right direction.

I don't know if the author meant to draw attention to "Japanese" in the sense that these people were especially surprised because they were Japanese and not of some other nationality.

But I do wonder if the Hacker-Wunderkind archetype is less well-known in Japan than it is here. I don't even think most westerners would be particularly surprised by a kid making a difference in software development because of the popular (if a bit exaggerated) notion of a young guy sitting in his garage at a computer writing crazy programs.

Being smart and attentive to detail are not related to age. So I'm not much surprised. Lucky for FLOSS and Ruby communities, one more new and bright guy came in.