8 ms·
Why is this faster? https://gist.github.com/jdpaton/9f20ff0b13e0cc20017a https://gist.github.com/jdpaton/9f20ff0b13e0cc20017a
by razorsese 13y ago
Why is this faster?
https://gist.github.com/jdpaton/9f20ff0b13e0cc20017a https://gist.github.com/jdpaton/9f20ff0b13e0cc20017a
- arh68 13y agoI did find this bit: // When calling .end(buffer) right away, this triggers a "hot path" // optimization in http.js, to avoid an extra write call. // // However, the overhead of copying a large buffer is higher than // the overhead of an extra write() call, so the hot path was not // always as hot as it could be. // // Verify that our assumptions are valid. https://github.com/joyent/node/blob/master/benchmark/http/end-vs-write-end.js https://github.com/joyent/node/blob/master/benchmark/http/en...