The old implementation does only increase the size of the wave one time
if the requested index is outside the capacity of the wave. This is okay
for smaller indexes but will return a too small wave if the requested
index is way larger than the current capacity of the wave.
This fixes the implementation in that way that it always calculates the
next suitable size that fits the requested index and resizes the wave
to always fit the requested index. This also includes a special logic to
use exponential growth with better asymptotical behavior for smaller
wave sizes and linear growth if the wave has a size that could have a
large impact on system memory.
With this EnsureLargeEnoughWaveSimple can no longer considered as
"simple" but the name is kept for compability. The documentation has
been updated.
The old implementation does only increase the size of the wave one time if the requested index is outside the capacity of the wave. This is okay for smaller indexes but will return a too small wave if the requested index is way larger than the current capacity of the wave.
This fixes the implementation in that way that it always calculates the next suitable size that fits the requested index and resizes the wave to always fit the requested index. This also includes a special logic to use exponential growth with better asymptotical behavior for smaller wave sizes and linear growth if the wave has a size that could have a large impact on system memory.
With this EnsureLargeEnoughWaveSimple can no longer considered as "simple" but the name is kept for compability. The documentation has been updated.