3 ms·
I 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. // /
by arh68 13y ago
I 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...