Settings

Theme

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

gist.github.com

3 points by gankgu 11 years ago · 4 comments

Reader

nostrademons 11 years ago

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.

coldtea 11 years ago

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.

gankguOP 11 years ago

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 11 years ago

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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection