2 ms·
You've been led astray by the benchmarks. The reality is it's literally as fast as C because you're just hooking out to zlib. It's much better to think of Ruby
by tychver 9y ago
You've been led astray by the benchmarks. The reality is it's literally as fast as C because you're just hooking out to zlib.
It's much better to think of Ruby as a Smalltalk like high level language used to glue together lower level high performance building blocks.
Looking at things from this angle we see the typical Rails arrangement is actually business logic written in a high level language calling a bunch of native libraries eg. application server (Unicorn), HTTP parsing (Raygel parser), JSON parsing/generation (oj), HTML parsing/generation (nokogiri), DB client (pg).