Live data from Hacker News

Python vs. Node vs. PyPy benchmarks

blog.kgriffs.com

41–50 of 57 posts

Re: Python vs. Node vs. PyPy benchmarks

#41
post #32

Earlier quoted context omitted.

Your observation is good. Author should clarify this. But in his next articles he shows benchmark against other web frameworks, which shows more justified results

That doesn't really answer why use the slowest one with PyPy (and no, uWSGI does not work for PyPy, but a lot of stuff does)

uWSGI works with PyPY (Obviously with lot of limitations on the features). http://projects.unbit.it/uwsgi/wiki/PyPy The problem is that for the vast majority of the webapps there is (still) no advantage. I only wanted to focus on that as i have invested days on (really complex for me) pypy sources, and i do not want people to ignore it ;)

Re: Python vs. Node vs. PyPy benchmarks

#43
post #33

Earlier quoted context omitted.

>> Even good, idiomatic JavaScript code sucks for reasons inherent in the language. Care to elaborate?

I'll just throw a couple pet-peeves of mine in here: - No proper packaging/namespacing - Completely idiosyncratic results when operating with mixed data types (10 + 'p' = '10p', 7/0 = 'infinity' and all that) - Variables default to a pseudo-global scope - Prototype based 'inheritance', while cool, is just cumbersome and inelegant compared to languages that have proper object oriented language constructs - Take all th…

- No proper packaging/namespacing

http://nodejs.org/api/modules.html

- Completely idiosyncratic results when operating with mixed data types (10 + 'p' = '10p', 7/0 = 'infinity' and all that)

I wouldn't call it idiosyncratic but just use Underscore and you are fine.

- Variables default to a pseudo-global scope

just use 'var' when declaring them

- Prototype based 'inheritance', while cool, is just cumbersome and inelegant compared to languages that have proper object oriented language constructs

Any OO is cumbersome and should be used only when it makes sense. If you don't like prototype based inheritance you can still use traditional OO with extra libs.

- Take all those and a syntax that was partially taken from Java, and you end up with verbose code jumble that is way more difficult to read than equivalent Python/Ruby (even C#)

Sorry to disagree again but there are many people preferring bracket based languages over those omitting them. You can quickly identify blocks and navigate through the source. And JS isn't verbose like Java.

JS has its quirks like any other languages but these are just very few and you get tons of amenities in return.

Re: Python vs. Node vs. PyPy benchmarks

#47
post #8

Another set of benchmarks that shows Erlang's cowboy coming ahead on EC instances. It also compares EC2 vs real hardware and throws more contenders in the mix. On physical hardware the race is pretty close (except node, python-gevent, but cluster node did very well). http://eric.themoritzfamily.com/websocket-demo-results-v2.ht...

Yeah, because of cowboy and Erlang's design it is going to out perform a single process evented server hands-down.

  1. The evented servers are bound to one CPU, Erlang will use all CPUs 
  2. any bit of blocking code will stall the other code, even it just for a moment.
It is a little unfair to compare the two approaches.

Re: Python vs. Node vs. PyPy benchmarks

#48
post #8

Another set of benchmarks that shows Erlang's cowboy coming ahead on EC instances. It also compares EC2 vs real hardware and throws more contenders in the mix. On physical hardware the race is pretty close (except node, python-gevent, but cluster node did very well). http://eric.themoritzfamily.com/websocket-demo-results-v2.ht...

Yeah, because of cowboy and Erlang's design it is going to out perform a single process evented server hands-down. 1. The evented servers are bound to one CPU, Erlang will use all CPUs 2. any bit of blocking code will stall the other code, even it just for a moment. It is a little unfair to compare the two approaches.

I am not sure it will always under-perform with one CPU. It depends if async threads are used and if kernel poll is enabled. Erlang is designed for better low latency response at the expense of _some_ sequential slow down. I wonder if Erlang would scale slower but it will throw less errors as number of requests increases.

EDIT:

Also it would seem benchmarking Erlang and forcing it to run on a single core just like node.js is deliberately handicapping it. One of the strengths of Erlang is exactly the ability to take advantage of multiple cores.

Re: Python vs. Node vs. PyPy benchmarks

#49
post #17

Earlier quoted context omitted.

If the web development industry moves from PHP to JavaScript as the main backend language... well, from quality perspective nothing will change. IMO.

If one company gave you a PHP job, and another a JS backend job, and that'd be all you got, would you flip a coin to pick one? Or is this a way to say that you feel more satisfied with your work in Python than with your work in node?

I would rather be out on the street busking.

Re: Python vs. Node vs. PyPy benchmarks

#50

Red and green side-by-side on a chart... noo :( http://jfly.iam.u-tokyo.ac.jp/color/#pallet http://tools.medialab.sciences-po.fr/iwanthue/

IMO its a little bit excessive to ask that every graph generated is color-blind safe...

Isn't there software for colorblind people to correct that? (Something that changes the palette of colors displayed...)

Post reply on HN