[fpc-devel] FPC/Delphi/FastMM4/TopMemory speed test
Marco van de Voort
marcov at stack.nl
Sat Jul 17 13:48:16 CEST 2010
In our previous episode, Adem said:
> > Afaik Delphi does so too, iirc the timestamp counters can vary lightly per
> > core due to powersaving features that make the core run faster/slower, so if
> > a program moves from one core to the next, this can happen.
> Can a running program be shifted to another core under Win7?
> Because, all I am doing is clicking a button in running exe --not
> restarting it.
Yes. It can do so to avoid one core getting to hot. (it is not hard to see
that that would happen if the OS would only use one core, or if it had
really rigid program->core assignments).
IIRC on Windows, the solution is to use queryperformancecounter functions
and not rdtsc.
You can see in your code that FPC doesn't do that much with that, so it is
nearly certainly not FPC. (and I know the behaviour from Delphi anyway).
This is all OS+CPU.
More information about the fpc-devel