Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Appending to an std:string character-by-character: how does the capacity grow?.
It's only not used when shift by 1 was so much cheaper than float mult.
llvm's libc++ uses this grow logic instead:
if (actual > 30) actual = ((actual & ~15) == actual) ? (actual + 15) : ((actual + 15) & ~15) - 1;
There are no comments on this comment yet.
It's only not used when shift by 1 was so much cheaper than float mult.
llvm's libc++ uses this grow logic instead:
which is actually closer to the metal, allocating a new page when needed.