from Hacker News

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

by gankgu on 1/29/15, 4:01 AM with 4 comments

  • by nostrademons on 1/29/15, 4:07 AM

    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.

  • by coldtea on 1/29/15, 4:13 AM

    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.

  • by gankgu on 1/29/15, 9:34 AM

    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.

  • by smt88 on 1/29/15, 5:11 AM

    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.