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)
Python vs. Node vs. PyPy benchmarks
41–50 of 57 posts
Re: Python vs. Node vs. PyPy benchmarks
#42Re: Python vs. Node vs. PyPy benchmarks
#43Earlier 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…
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
#44Re: Python vs. Node vs. PyPy benchmarks
#45Re: Python vs. Node vs. PyPy benchmarks
#46If you are using wsgiref don't forget the patch __import__('BaseHTTPServer').BaseHTTPRequestHandler.address_string = lambda x:x.client_address[0]
Re: Python vs. Node vs. PyPy benchmarks
#47Another 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...
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
#48Another 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.
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
#49Earlier 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?
Re: Python vs. Node vs. PyPy benchmarks
#50Red 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/
Isn't there software for colorblind people to correct that? (Something that changes the palette of colors displayed...)