Closed JaoodxD closed 2 weeks ago
I'm probably not the right person to answer this. But it seems to be an intended behavior; apparently Node.js is aware of the "one wasted space" but it trades with a faster check (?)
I'm probably not the right person to answer this. But it seems to be an intended behavior; apparently Node.js is aware of the "one wasted space" but it trades with a faster check (?)
Seems like you're absolutely right.
Due to it is an intended behavior and that behavior claims to improve performance in the process.nextTick
call; I'll proceed to close this issue.
Thanks for the report.
During adopting
FixedQueue
to Piscina in Piscinajs/piscina#555 I spotted that current Node.js implementation always leave 1 empty slot in each internalFixedCircularBuffer
.When we fulfill
FixedCircularBuffer
with 2047 out of 2048 elements, theisFull()
will return true. is this done on purpose or is it a bug?