|
|
|
|
|
by samatman
1567 days ago
|
|
Hey, an opportunity to shill my favorite ISO standard! It's 3. ISO 3, preferred numbers: https://en.wikipedia.org/wiki/Preferred_number#Computer_engi... For your application, I would apply a heuristic which includes the x3 values at some point (256KiB?), and maybe the x5 values near/at 256MiB. Allocation is so expensive relative to calculating the allocated value that you could use something really complex and it would work. Certainly multiplying by a factor between one and two and rounding to the nearest word would work, there's no way you'd see a performance difference from the calculation. The advantage of ISO 3 is that the user always gets a familiar number of allocated bytes back. |
|