-
Notifications
You must be signed in to change notification settings - Fork 79
Conversation
Want to close #21 since this includes it? |
@jasnell yes. @evanlucas adresses. |
@evanlucas @jasnell I moved away from Map() and converted it back to |
@mcollina won't moving back to an object prevent setting headers like |
@evanlucas this is the behavior that we have on https://github.com/nodejs/node/blob/master/lib/_http_outgoing.js#L365 There is PR to change that, see nodejs/node#6102. |
I suppose http2 support won't land before v8.0.0? By that time, we will have a much more recent version of V8 in which the for-of loop could be fast enough. |
I like what @targos is saying. Optimise as required, when required. |
I strongly disagree. There are both perf and compatibility issue with http1 -> see the discussion there. This particular code makes no sense if it is not as fast as possible. |
@mcollina ... switching away from |
@targos: the goal is to get this into 8.x as close to 8.0.0 as possible as experimental. |
@jasnell should be good now. Please review. |
@mcollina ... I'm going to get this landed so I can start building off of it. |
Landed! |
includes #21.
I have used bind in some cases where perf was not needed and we needed to pass some parameters to the function.
bind
is as fast as creating a closure in the latest V8, but it is not hoisted and so we avoid it altogether for the happy-path.