You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 3, 2022. It is now read-only.
I'm working on a fat heavy branch and I'm keeping notes of optimizations that we should backport everywhere
use this inside constructors, v8 literally pattern detects for this.foo = x and NOT self.foo =x
use bucket based OutPending() data structure instead of naive dictionary
use write ahead to avoid calling RW.byteLength. buf.write() returns bytes written, and with our offset tracking we can always backtrack and set frame.writeUInt32BE(finalOffset, 0)
use TCP_WRAP if process.version === 0.10.32 to go 30% faster.
use 512kb SlowBuffer pool instead of new Buffer()
use the arg2str or arg2buf trick.
use the caching headers + writeHead() & writeTail() trick.
use utf8slice and utf8write.
avoid reading arg1 as slice when we only need string anyway.
thread offset through frame parsing to avoid SlowBuffer#slice where possible.