Live data from Hacker News

Web Framework Benchmarks Round 2

techempower.com

231–240 of 241 posts

Re: Web Framework Benchmarks Round 2

#231
post #82

I wish Lua was tested in the benchmarks. In particular, Lua-CJSON [1] [1] http://www.kyne.com.au/~mark/software/lua-json-performance.h... (I know, everyone wishes their favorite language was represented and not all can be tested. I'm just posting this in case the OP does a "Round 3") EDIT: fix typo

ngx_lua [1] will beat all of them no matter which JSON library used, end of story.

BTW, LuaRocks is supported [2]

[1] https://github.com/chaoslawful/lua-nginx-module

[2] http://openresty.org/#UsingLuaRocks

Re: Web Framework Benchmarks Round 2

#233

Yesod disappoints! Unfortunate for how much it is hyped. This is definitely good to know, even if it appears that the Warp server was not used.

I wrote the Yesod tests for this benchmark.

It uses Warp.

Actually, the performances of Yesod are not so bad, as Play's are. Top performing frameworks (netty, vertx, go) are not web frameworks but async programming frameworks. They don't carry a lot of things around -- just push the serialized data on the raw socket output stream. Yesod/Play/Django/Rails/... on the other hand must manage routes, content types, browser headers, etc etc....

Re: Web Framework Benchmarks Round 2

#234
post #228
post #215

Earlier quoted context omitted.

> when benchmarking against strongly typed compiled languages, performance concerns become important, even if you have to write ugly code That seems to defeat the purpose of benchmarking to begin with, or at least makes it less useful for real-world comparison.

It's already not an apples to apples comparison. For instance, what's in the Node examples is much the use of frameworks built to enable rapid prototyping, not built to handle the needs of performance-oriented services. So we're comparing some optimized systems designed to be used in production versus frameworks designed to be terse instead of performant.

That's fair. Though I think anyone who just picks technologies based on these bar graphs alone is also missing the point, so some critical thinking is required to interpret these benchmarks, as usual.

Re: Web Framework Benchmarks Round 2

#235

Earlier quoted context omitted.

I chose that number because of this anecdote: I worked at a start-up a few years ago. I worked on a PHP-powered website that spoke to a Java-powered (Spring/Hibernate) service layer. The PHP team consisted of one: me. The Java team consisted of over 10 engineers. I outpaced them easily and consistently. In other projects with similar divisions, I've had similar experiences, though not always so dramatic.

I used to be a hired gun that would be called in occasionally to, like you, code circles around bigger teams when deadlines were tight. Last few years however I decided to stick around with one of my clients for a while and I realized that quite a few of the employees I considered sub-par before were actually pretty decent programmers doing their best to do quality work in a dysfunctional environment. I've since then…

You're exactly right. I hope my comment didn't come across as critical to the engineers I worked with. Some of them are the best engineers I have ever worked with, and I have great respect for them.

Re: Web Framework Benchmarks Round 2

#236
post #225

Sequelize (used for the node-mysql tests) is the slowest ORM out for Node, others are much faster (i.e. the node-mysql module). And I would love to see node-mongodb tests with the native Mongo driver and not with Mongoose (which is slower).

Something like this would be way faster than Sequelize: https://github.com/mgutz/mapper

Re: Web Framework Benchmarks Round 2

#237

I recently started transitioning from PHP to Rails. Should I be reconsidering?

Maybe, maybe not, that depends on your priorities- If your concern is (or a major concern) is performance, then yes, you should reconsider (maybe look at Go?). If that is not a major concern, maybe not. (I personally am not a Ruby fan due to performance and security issues, but it works well for many people)

Re: Web Framework Benchmarks Round 2

#239
post #179
post #60

Earlier quoted context omitted.

We're looking into moving to unicorn as the community has suggested. If anyone is interested in setting up Puma or Goliath, we'd be interested in testing those out as well.

For something like the query tests where you're IO-bound, Puma is going to annihilate the competition. For CPU-bound tests like JSON generation, unicorn with multiple workers is going to perform better. It's worth noting that Rails' default JSON solution is the compatible-everywhere pure-Ruby JSON generator. Using a drop-in replacement like the oj gem will drastically improve throughput there. I didn't get to the pul…

Well yes please do this, not sure if it is allowed though since Oj gem is written in C ( I think )

Re: Web Framework Benchmarks Round 2

#240
post #239
post #179

Earlier quoted context omitted.

For something like the query tests where you're IO-bound, Puma is going to annihilate the competition. For CPU-bound tests like JSON generation, unicorn with multiple workers is going to perform better. It's worth noting that Rails' default JSON solution is the compatible-everywhere pure-Ruby JSON generator. Using a drop-in replacement like the oj gem will drastically improve throughput there. I didn't get to the pul…

Well yes please do this, not sure if it is allowed though since Oj gem is written in C ( I think )

So is the mysql2 driver (at least the slow parts), and Passenger is C++. C extensions are a common part of your standard Ruby deployment stack.
Post reply on HN