Hacker News new | ask | show | jobs
by curiousAl 4573 days ago
I've been following these for most of the rounds, and Go has been improving impressively. Whether that's because of improvements in the language itself or a more zealous crowd sending pull requests, I don't know, but it made me want to try go, so I did. It's not as comforting as the scripting (PHP, Python, JS) languages I'm used to. Having no REPL and having to think about types takes a bit more getting used to than I thought (arrays vs slices/maps, and having no REPL). I find having a quick build script (mine's in vim) so you can compile+run and go back to the code quickly helps a lot. Also, http://play.golang.org/ isn't too shabby either.

It would be fun to see this project (https://github.com/TechEmpower/FrameworkBenchmarks) become more and more popular, with formidable developers squeezing out performance from their framework of choice.

1 comments

Yeah but I'm kind of confused as it's my understanding Go is not a web framework so much as a language. Is this just testing how fast Go can print out the string "{message: 'Hello World'}"? Or are they testing a specific component/library in Go? I mean obviously having a language just spit out a line is going to be faster than having a fully blown framework such as Rails work through all of the query parsing, view building, etc. so it doesn't seem like a very fair or useful comparison.
It's included, alongside Go frameworks, for the same reason PHP/Ruby/ASP.NET are included -- so that you can see how much overhead the frameworks are adding compared to a minimal implementation in the language they're built on. The code behind every benchmark is available under the source code tab up top. The Go benchmark is using some JSON library, not just printing a string.
The issue is that Go comes with enough included in the standard library that it could be considered a web framework. If you're just build a few rest endpoint or a simply site, you may not need to leave the standard library.

Compare that to a language like Python or Ruby, where you need something "extra" to make it easier to do a web application. You could certainly do with just the standard library in other languages, but very few would choose that option, because it would involve write a lot of additional code.

I think it fair to include Go, because it's a language/programming environment, that comes with it's one built in web framework. A framework that's actually advanced enough that many don't need to look else where.

Go is a language, but its standard library is very comprehensive for most things Internet related and you can build web applications quite easily using just that. You also have similar examples in the benchmark using nodejs and php, which aren't exactly frameworks.

I know there should be some overhead when using a framework, but sometimes the cost is too high and it's useful to know it (compare php and symfony2, for example).

You can look at the Revel benchmark, a web framework written in Go which did quite well in the benchmark.

Right, Go is a language. It does have a decent (built in) HTTP library, and is actually pretty fast as a webserver in itself. On the more conventionally robust framework end of things, I suppose Revel/Falcore would be a more appropriate comparison. (both of which have impressive performance of their own).