4 ms·
yes, i know growth by a factor of 2 has issues under certain usage patterns. those are less likely to be problematic when there is more stuff going on than just
by nice_byte 4y ago
yes, i know growth by a factor of 2 has issues under certain usage patterns. those are less likely to be problematic when there is more stuff going on than just growing the buffer - you can use the "hole" for other allocations.
- rkeene2 4y agoHard to tease out what you're saying here, but maybe a Hashed Array Table (HAT) is what you're referring to ? I have a slightly extended version here [0][1] [0] https://rkeene.org/viewer/tmp/hat.c.htm https://rkeene.org/viewer/tmp/hat.c.htm [1] https://rkeene.org/viewer/tmp/hat.png.htm https://rkeene.org/viewer/tmp/hat.png.htm
- quibono 4y agoI think GP meant that his implementation doubles the capacity of the array on resize as opposed to increasing by 1.5 or some other factor.