Optimize persistence CPU (#100737)
A few small optimizations from profiling * Replace SmallVec with Vec for our encoding buffer - During persistence these are pooled and preallocated so we never benefit from the inline storage - SmallVec places branches around core operations which complicate codegen * Avoid temporary allocations during encoding via a new 'filtered collection encode primitive'. This allows us to guess a size and fix it later by overwriting the varint. * Expand the SST Writer output buffer to 256K to reduce the number of `write` syscalls by about 90% * Update to the new bincode-fork location in vercel-labs, which also picks up a small varint encoding win Altogether these saved about 10% cpu time and 25% wall time for v0 persistence
Showing
Please
register
or
sign in
to comment