[fpc-pascal] Growing dynamic arrays performance (another thing)

Пётр Косаревский ppkk at mail.ru
Fri Jul 11 10:35:49 CEST 2008


Is there a canonical way to reserve memory for a dynamic array?

When there are several slowly growing dynamical arrays I encountered severe performance drop (probably, they tried to overlap each other many times).

Setting estimated length and navigating with extra counter inside each of them (and growing by 10%+100 elements if needed) completely solved the problem.

This issue does not seem to be resolvable without manual memory preserving, is it possible to do it so that range checking will work and extra counters won't be needed?



More information about the fpc-pascal mailing list