Am 25.12.2012 14:53, schrieb Jy V:
Although FPC heap manager is good, but custom pool memory allocation
will be much faster, since it will be very simple:
Result:=CurPoolPtr;
Inc(CurPoolPtr, BlockSize);
if CurPoolPtr > MaxPoolPtr then AllocNewZeroFilledPool();
It is not needed to handle memory releases during object
destruction. Since all nodes are available during whole compiling
phase (parsing, code generation, etc) and released only at the end
of a phase, it is possible just to release whole pool blocks at the
end of a phase.
Such pooled base class for compiler nodes should inrease performanse
a lot.
I do agree,
you should consider his position.
The total time FPC spend in memory manangement is 20% iirc. So I don't
see much optimization potential here.
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel