4 ms·
> (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], wh
by 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...