[fpc-pascal] Feature announcement: Dynamic array extensions
Nitorami
mneubauer at alice-dsl.net
Mon Jun 4 13:54:47 CEST 2018
>> It would be reasonable to assume that the predefined + might be
>> substantially more efficient than a programmer-defined one could be.
>Yes, that's one of the reasons I vote for keeping the new feature
>and allow to overload the operator.
I don't think that argument holds water. Concatenation of dynamic structures
is a slow function in the first place. I am not a core developer, but I
consider that regardless how you do it, it will require a call to setlength,
which in turn will call the operating system to allocate memory for the now
larger structure. That takes much more time than a few assembly instructions
for a normal pascal procedure call.
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
More information about the fpc-pascal
mailing list