4 ms·
Python has benefited from years of throughout optimization of the language for real-world use. Go is still under heavy development and is not as optimized as ot
by Artemis2 13y ago
Python has benefited from years of throughout optimization of the language for real-world use. Go is still under heavy development and is not as optimized as other languages that have devs focused on optimization (that explains why node.js is a bit faster than Go for handling HTTP requests at the moment).
- stock_toaster 13y ago> (that explains why node.js is a bit faster than Go for handling HTTP requests at the moment) Pretty sure node's http parsing is handled by http-parser[1], which is written in C (originally pulled from nginx as I recall). Go's http parser is written in Go. [1]: https://github.com/joyent/http-parser https://github.com/joyent/http-parser
- zimbatm 13y agoIf I remember correctly the initial versions of node had the ragel-based http parser from mongrel but then ryan rewrote it. http-parser is hand-written.
- stock_toaster 13y agomaybe not entirely hand written? source[1] [1]: https://github.com/joyent/http-parser/blob/master/LICENSE-MIT#L1 https://github.com/joyent/http-parser/blob/master/LICENSE-MI...
- nickpresta 13y ago> (that explains why node.js is a bit faster than Go for handling HTTP requests at the moment) I'm not sure that is true any more: http://www.techempower.com/benchmarks/#section=data-r8&hw=i7&test=plaintext&l=cu8&p=5c-0&f=ziimf3-qmx0qn-zijobv http://www.techempower.com/benchmarks/#section=data-r8&hw=i7... At any rate, "handling HTTP requests" can't possibly be your bottleneck, given network communication, serialization, etc.