

Golang only 2x ruby at net/http level and same as ruby at web framework level? - gankgu
https://gist.github.com/gankkank/3a59513ea81cb5ec5e33

======
nostrademons
TechEmpower has it at about 3x Ruby at net/http level, but close to 10x on
BeeGo vs. Sinatra.

[https://www.techempower.com/benchmarks/#section=data-r9&hw=p...](https://www.techempower.com/benchmarks/#section=data-r9&hw=peak&test=json)

(Interestingly, JRuby is actually within about 10% of Go.)

This doesn't surprise me all that much: the guts of Ruby's HTTP parsing &
network handling is generally done in C. It's only when you layer all the code
in Rails through the default Ruby interpreter that it gets slow.

------
coldtea
What does this "hello world" measure?

It doesn't measure Ruby's speed, that's for sure. The IO is C, and the HTTP
parsing and network operations are also C in Ruby.

Also the frameworks you used are minimal (for both Ruby and Go) so their
overhead is negligible as well. Again you're mostly measuring some C calls vs
Go calls.

So, a more accurate title would be: "Golang only 2x C at net/http and same as
C at web framework level".

Now, try a full blown Rails service or a Sinatra endpoind that DOES some
processing, not just prints something, and compare it with the same thing in
Go.

------
gankgu
But in actual world, people will be attracted by post like "Iron.io Blog: How
We Went from 30 Servers to 2: Go". And like to think so we can use it do
faster and easier !

Also, for start-ups, It's important to choose a language that has a certain
level of performance rather than rewrite all codes later.

------
smt88
Cross-language benchmarks are nonsense.

Hardware can be scaled. Time cannot. Use the platform that saves you the most
time (now and when you're in "maintenance" mode) and worry about performance
later.

