[fpc-devel] XML node dump feature
denisgolovan
denisgolovan at yandex.ru
Tue Jun 25 10:19:47 CEST 2019
> Can I have an example of "hoisting pure functions out of loops" that you
> speak of?
Sure.
I mean something like following (completely artificial example):
function PureFunc1: ...
function F(arg: Integer): Integer;
var s:Integer;
begin
s:=0;
for i:=0 to 100 do
s:=s+PureFunc(arg);
Result:=s;
end;
Of course, the real value of pure functions for optimization oppotunities is some combination of generics and closures, but that's completely another story...
--
Regards,
Denis Golovan
More information about the fpc-devel
mailing list