[fpc-devel] x86_64 Optimizer Overhaul

Florian Klämpfl florian at freepascal.org
Sat Dec 15 17:12:32 CET 2018


Am 12.12.2018 um 13:49 schrieb Ryan Joseph:
> 
> 
>> On Dec 12, 2018, at 7:20 PM, Martok <listbox at martoks-place.de> wrote:
>>
>> Checking out the memory manager(s) could be useful as well - there are a lot of
>> small allocations, that generally tends to put much stress on it.
>> And any improvement there would also directly benefit user applications.
> 
> I was going to say the same thing myself and even planned to do a test. My profiles show the top hits being getmem/freemem which really don’t need to be there.
> 
> There’s no reason to be allocating and freeing nodes (for example) over and over again when we could just allocate a large pool at startup and return to the pool instead of freeing. It would make the compiler utilize more memory but that’s a good trade off for me personally. This is especially a good idea because the compiler is a one pass program so leaks over the long term aren’t a problem.

The memory manager itself pools already, so no need for the compiler. If somebody wants to improve the heap manager:
implement OS supported re-allocations (OS can move memory by just shuffling pages).



More information about the fpc-devel mailing list