Am 03.11.2014 08:32 schrieb "Nico Erfurth" <n...@erfurth.eu>:
>
> On 02.11.14 15:05, Xiangrong Fang wrote:
> > Sorry, the results in previous mail was mis-labeled.
> >
> > ​
> > The result is:
> >
> > Using SetLength:
> >
> > Alloc:  9.4078169999999997E-0001
> > Clear:  2.1342020000000002E-0001
> >
> > Using GetMemory:
> >
> > Alloc:  2.8100000000000000E-0005
> > Clear:  7.7497550000000004E-0001
>
>
> SetLength will already clear the array before returning it, so the time
> for SetLength is approximate time(GetMem) + time(Clear).

Ah, right. I forgot that :)

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to