Hacker News new | ask | show | jobs
by vidarh 913 days ago
The few places I need more performance, I just use FFI and contain the tiny bits needed outside of Ruby. I wrote my MSc on using statistical approached to improve ocr error rates, and 99.9% or so of the code was Ruby - I needed to translate a few dozens of lines of code to C e.g. a knn implementation after I'd proven it worked.

In 18 years of Ruby use, this has been typical. E.g. I've done large scale (tens of thousands of layers) map tiles rendering in Ruby, and only a tiny core of the final rasterisation code was worth rewriting even back then at a time when Ruby was far slower.