Commit 08133f45 authored by Brendan Ashworth's avatar Brendan Ashworth
Browse files

http: optimize outgoing requests

This commit does some small optimization changes on
`lib/_http_outgoing.js`. These include switching from `while` loops to
`for` loops, moving away from `util` to `typeof` checks, and removing
dead code. It also includes variable caches to avoid lookups and
generic style changes. All in all, much faster execution.

It gets an across the board increase in req/sec on the benchmarks,
from my experience about a 10% increase.

PR-URL: https://github.com/iojs/io.js/pull/605


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarNicu Micleușanu <micnic90@gmail.com>
Reviewed-By: default avatarChristian Vaagland Tellnes <christian@tellnes.com>
Reviewed-By: default avatarBrian White <mscdex@mscdex.net>
parent 7b3b8acf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment