[fpc-devel] Faster InitObject
Alexander Shishkin
alexvins at mail.ru
Fri Feb 24 10:26:32 CET 2012
24.02.2012 0:43, Amir пишет:
> The performance of FillChar is not my problem, The main issue in my case
> is that my class has a big array defined inside it. I developed my code
> such that this array does not need to be initialized with zero initially
> (I have not assumed anything about the content of this array).
> But the InitInstance function, initialize the array with zero.
>
You also may refactor your class and define array as a pointer to array
(dont use dynamic array - they are zero initialized) and manage memory
manually ( [Get|Realloc|Free]Mem ).
More information about the fpc-devel
mailing list