Live data from Hacker News

Golang only 2x ruby at net/http level and same as ruby at web framework level?

gist.github.com

1–5 of 5 posts

Re: Golang only 2x ruby at net/http level and same as ruby at web framework level?

#2
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...

(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.

Re: Golang only 2x ruby at net/http level and same as ruby at web framework level?

#3
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.

Re: Golang only 2x ruby at net/http level and same as ruby at web framework level?

#5
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.