[fpc-devel] x86_64 Optimizer Overhaul

Ryan Joseph ryan at thealchemistguild.com
Wed Dec 12 13:49:45 CET 2018



> 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.

Regards,
	Ryan Joseph




More information about the fpc-devel mailing list