4 ms·
I don't why this needs to be an either/or proposition. Write your program in Ruby. Where it needs speed, write the pertinent bits in C++. I've done this befo
by mjbellantoni 15y ago
I don't why this needs to be an either/or proposition. Write your program in Ruby. Where it needs speed, write the pertinent bits in C++.
I've done this before with Ruby and C. Two great tastes that go great together!
- chrismdp 15y agoI looked at this, but the stop the world GC would still kill the frame rate from time to time sadly. Also there's a large amount of inefficiency in the object translation layer between the two languages.
- mjbellantoni 15y agoI can believe that, but wonder if it needs to be so. For example, in my (limited) experience, you have to draw the boundary between what's in Ruby and what's in C/C++ intelligently. If you're still doing most of your computation in C on Ruby Arrays and Hashes, you're not going to get much of a performance win at all.