-
Ell authored
Copy the pattern using exponentially increasing block sizes, using the already-copied data as the source, yielding a logarithmic number of memcpy()s, instead of linear. The block size is not increased indefinitely, as to not saturate the cache, so for large copies, the number of memcpy()s is still linear, but using a big-enough block size as to make it irrelevant. I actually had a benchmark for this, but it died with the old hdd :P IIRC, in some cases we care about, this about doubles performance. In other cases, it's far less significant, but it never (in realistic terms) seems to be a pessimization.
d195c300