[fpc-devel] Need heap manager -gv explanation [tests]

Tomas Hajny XHajT03 at hajny.biz
Tue Apr 29 11:49:20 CEST 2014

On Tue, April 29, 2014 10:30, Petr Kristan wrote:
> I use "inteligent" block increasing. I can optimize program, but why is
> fpc heap manager to slow?
> Here is the sample stress program compilable with fpc, delphi and kylix:
> And here are results:
> Is possible to speedup heap manager?

Well, results of your test program on my machine (physical machine, MS Win
7 32-bit) show something different:

Grow 0-9000000 31ms
Grow 10000000-19000000 109ms
Grow 20000000-29000000 172ms
Grow 30000000-39000000 250ms
Grow 40000000-49000000 327ms
Grow 50000000-59000000 406ms
Grow 60000000-69000000 483ms
Grow 70000000-79000000 546ms
Grow 80000000-89000000 625ms
Grow 90000000-99000000 702ms
Grow 100000000-109000000 764ms
Sum 4431ms

(compiled without cmem / without valgrind)

Grow 0-9000000 31ms
Grow 10000000-19000000 125ms
Grow 20000000-29000000 203ms
Grow 30000000-39000000 265ms
Grow 40000000-49000000 375ms
Grow 50000000-59000000 436ms
Grow 60000000-69000000 531ms
Grow 70000000-79000000 624ms
Grow 80000000-89000000 733ms
Grow 90000000-99000000 796ms
Grow 100000000-109000000 873ms
Sum 5008ms

(compiled with -gv; as expected, adding CMem to the uses clause and
compiling without -gv gives basically the same result).

Tests performed with trunk compiler based on SVN from about 10 days ago.
Results for 2.6.4 are more or less the same.

I don't know the reason of your difference, but no time necessary at all
(0 ms) for the valgrind variant looks very suspicious to me.


More information about the fpc-devel mailing list