r/Python • u/tryptic37 • Jan 17 '10
Debunking the Erlang hype for servers: Python isn't as slow as you think.
http://www.codexon.com/posts/debunking-the-erlang-and-haskell-hype-for-servers7
Jan 17 '10 edited Jan 17 '10
Apparently he didn't read the update posted on one of the articles he linked to.
Erlang ... is a language and a high-quality runtime system optimized for concurrent and distributed execution. The examples below do not really exercise any of these strengths.
These bench marks, yet again, do not test concurrency, distribution, parallelization, etc. The only mention of it is the author's complaint that Erlang didn't support SMP until 2006 (which is four years ago and before much of this hype).
-4
u/tryptic37 Jan 18 '10
I did read it.
The only problem is that he offers no evidence to support his change of mind other than the fact that he says so while his benchmarks speak for themselves.
3
Jan 18 '10
You're missing the point. The hype about erlang is not about its speed. The speed is only a byproduct of the easy distributed computing, parallelization, and concurrency, but his benchmarks and yours are only testing raw speed.
Let me provide an analogy.
Erlang community: Erlang-fruit is better than Python-fruit at preventing cancer because it has more antioxidants! Yay Erlang!
You: But these tests clearly show that Erlang-fruit is not better for your digestion than Python-fruit, and is only slightly better for your digestion than Haskell-fruit! Therefore Erlang-fruit cannot be better than Python-fruit [in general]!
7
5
u/bsergean Jan 17 '10
I agree with the author in the sense that everyone says python is slow those days. Maybe it's too slow for facebook chat or a super custom app but for everyone else it's good enough, and has a huge set of cool feature, very easy to read/write has tons of libraries out there. And before trying to scale to 60.000 request per seconds people should take care of having more that 10 users and designing a webapp that people want to use :)
Bashing Python is really to me a case of early optimization. Plus in this bench we see that with epoll it's very fast, and with tornado and friendfeed we have an example of a fast webapp that scales (plus reddit and a bunch of those).
1
Jan 21 '10
I'd challenge the performance of a nine year old's Python async IO based code to facebook's Erlang code. Heck, I'd challenge my first Pascal DOS applications to their PHP code. Still, Erlang has a more elegant concurrency model and that article is comparing apples to oranges.
1
u/pdc Jan 22 '10
So far as I know RabbitMQ and CouchDB are written in Erlang for correctness rather than for speed -- that is, for the sort of tricky concurrent programming they require, Erlang makes it easier to write a server that does not have bugs in the multiprocessing code.
18
u/Justinsaccount Jan 17 '10
I'm not sure if the article is supposed to be a troll or not.
I'll take python over erlang any day(it hurts my head), but the fact that a python http server that writes "Pong" is faster than one written in erlang is completely irrelevant.