Since we are only hours/days away from a public beta, I just set up a ruby2c mailing list for those interested in the project. See??? I was paying attention during the basecamp workshop!
Sign up and get involved!
Since we are only hours/days away from a public beta, I just set up a ruby2c mailing list for those interested in the project. See??? I was paying attention during the basecamp workshop!
Sign up and get involved!
I'm probably a bad person for doing this. I'm sitting at the back of the room of the basecamp workshop here in Seattle. DHH and company are at the front talking about basecamp and how to launch / promote web apps and the like. I'm back here coding on Ruby2C. I've got Eric sitting next to me, coding on his stuff, and helping me on mine. Dave Thomas sitting next to him, being good and actually paying attention to the workshop.
We just hit something HUGE. We just broke our 80% translation threshold for release:
667/ 667 ( 81.71%): pass yaml.rb
Out of 667 files in ruby's library and my own code, we translate 545 of them. That doesn't mean that the C code is perfect, or even compiles for that matter, but it is sooo close we can taste it.
I've got some polish I need to put in, rdoc and the like, and then we are releasing.
R2C, RSN... really.
def hello(n)
1.upto(n) do
puts "hello world"
end
end
into the following C code:
void
hello(long n) {
long temp_var1;
temp_var1 = 1;
while (temp_var1 <= n) {
puts("hello world");
temp_var1 = temp_var1 + 1;
}
}
class MyTest
def factorial(n)
f = 1
n.downto(2) { |x| f *= x }
return f
end
inline(:Ruby) do |builder|
builder.optimize :factorial
end
end
and dynamically replaces the ruby version, in this case, an 8.8x speed-up with zero effort!