Wednesday, November 04, 2009

A Japanese Teenage Boy Improved Ruby 1.9 Performance Up to 63%

Japanese online magazine, @IT Jibun Senryaku Lab. (information site for IT engineers to educate and/or develop oneself), published an interview with a Japanese teenage boy, Masahiro Kanai, who improved the performance of several methods in Ruby 1.9. He is the age of high school freshman (the third grade of junior high school in Japanese school system). The article (written in Japanese) is here.

According to the article, Masahiro Kanai joined “the Security and Programming Camp 2009” this summer and chose the subject of Ruby’s performance improvement. His mentor was Koichi Sasada (ko1). 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.

What Masahiro Kanai did was fundamental for performance tuning. He took unnecessary macro references out from a loop. Masahiro spotted macros below in array.c, string.c, and struct.c were referred every time Ruby checked whether data was hold in a structure or not. Even though data were constants, Ruby saw the macros to judge data’s presence in every loop.

-RARRAY_PTR, RARRAY_LEN
-RSTRING_PTR, RSTRING_LEN
-RSTRUCT_PTR, RSTRUCT_LEN

He optimized the loop by eliminating macro references when data were constants.

The interviewer acclaimed that he made it in his age.

11 comments:

Unknown said...

The title is a bit dramatic.

Anonymous said...

Congrats :)

I'm Dario said...

Kudos! A performance improvement of 8% is absolutely good.

Unknown said...

The title is the same as japanese article. The boy is, indeed, a genius. 8% is great.

Anonymous said...

Why were they surprised by his age? Young people can't be good at anything?

Anonymous said...

i'd have to agree with that part. it shouldn't be of any surprise with the age.

demo yappari, omedetou!

yokolet said...

I modified the last sentence since my translation was not accurate. Still his age is matter to the interviewer but might not so matter for other Japanese people.

In any case, there's a cultural difference. Generally, Japanese people link an age to his or her activity much more than Americans. In terms of Japanese standard, many people there might have thought he was really young to have made it.

Unknown said...

awesome kid is awesome. wasn't even doing anything productive when i was in high school :(

Alejandro Valenzuela said...

Awesome kid is awesome, agreed.
I was my computing teachers' headache at that age, but I certainly was no Ruby contributor. Congrats!

Paul said...

Speaking of age, I see that you're 253! Wow you look great for your age! ;)

DEBA ORGANISATION said...

It is a nice blog where the Japanese Teenage boys improved 63%. It is a good percentage. The boys are Genius. The Japanese people link an age to his or her activity much more than Americans. Thanks your blog is attract to me.