6 ms·
don’t perform very well (see CPython, Ruby) Sigh. I really wish that smart people would stop spreading myths. Ruby, at least, performs quite well. The "Ruby is
by area51org 11y ago
don’t perform very well (see CPython, Ruby)
Sigh. I really wish that smart people would stop spreading myths. Ruby, at least, performs quite well. The "Ruby is slow" days are years behind us.
- matthewmacleod 11y agoI'm like the biggest Ruby fan out there, but c'mon – that's just not true! Ruby is great at many things, and it has adequate performance for many situations -'Fast Enough', as DHH said. And with liberal use of C extensions, I've used it in some high-performance scenarios where the expressiveness was more beneficial than the complexity of using extensions. But it's really not fast – up to 100x slower than Java (http://benchmarksgame.alioth.debian.org/u32/compare.php?lang=yarv&lang2=java http://benchmarksgame.alioth.debian.org/u32/compare.php?lang...) or 30x slower than Javascript on V8 (http://benchmarksgame.alioth.debian.org/u32/compare.php?lang=yarv&lang2=v8 http://benchmarksgame.alioth.debian.org/u32/compare.php?lang...). I know these are micro benchmarks, but they're useful for comparison. Some of this is down to the nature of the Ruby interpreter and will improve with time (and with implementations like JRuby). Some of it is down to the highly dynamic nature of the language. The point remains though – if you need high performance for a particular task, Ruby may not be the best option.
- cuillevel3 11y agoRuby isn't that much slower than other slow languages. But compared to the fast ones it is really really slow.
- igouy 11y agoThere's a chart for that -- http://benchmarksgame.alioth.debian.org/u64/which-programs-are-fastest.html http://benchmarksgame.alioth.debian.org/u64/which-programs-a... -- but the question is always really really slow to do what exactly?
- xrange 11y ago>Ruby, at least, performs quite well. Are you talking absolute performance (as in machines are faster now, so speed has become less important) or relative performance (compared to performing the same task with a different interpreter/complier)? https://benchmarksgame.alioth.debian.org/u32/benchmark.php?test=all&lang=yarv&lang2=sbcl&data=u32 https://benchmarksgame.alioth.debian.org/u32/benchmark.php?t...
- pmelendez 11y agoIs it though? I still see them on the tail in terms of performance: http://benchmarksgame.alioth.debian.org/u32/performance.php?test=fannkuchredux http://benchmarksgame.alioth.debian.org/u32/performance.php?... http://benchmarksgame.alioth.debian.org/u32/performance.php?test=nbody http://benchmarksgame.alioth.debian.org/u32/performance.php?... Here comparing with Racket ( not even Java, C#, C++ or C) http://benchmarksgame.alioth.debian.org/u32/compare.php?lang=yarv&lang2=racket http://benchmarksgame.alioth.debian.org/u32/compare.php?lang...