[question] Why nodejs keep use c http_parser not this?
meritozh opened this issue · 1 comments
I have read the PR about replace http_parser
with js implementation. It's benchmark show js version is much more faster. Why nodejs keep use C version? Any trade-off here? I'm very interesting in this.
This is a question for the Node.js team, and not us, but it would probably be great if Node switched to a JS implementation of their parser (might make it easier to swap in modules like ours, though might make it harder), however, regardless of performance, Node's HTTP parser is strictly HTTP-compliant, and this module is more flexible, trying to parse requests and responses that aren't strictly valid HTTP, which is useful for many people doing web-crawling tasks and such, so Node would probably want their own implementation.