CPCWiki forum

General Category => Programming => Topic started by: cpcitor on 23:15, 29 October 13

Title: Using emulator for performance measurement and profiling ?
Post by: cpcitor on 23:15, 29 October 13
Hello,

When optimizing software seriously, precise reproducible overall measurement are important.

Duration measurement on a real CPC

When optimizing a demo running at native framerate, a tradition is to change border color at end of computation and see at which line on the screen color changes. Adjust code, run and see if the color change is higher or lower. It's relatively precise but not scriptable.

For longer computations, this cannot work. You can count the number of interrupts at 300Hz, which is much less precise.

On a real CPC are there other options ?

On an emulator

Emulators (with cycle accurate z80 emulation) open up interesting possibilities.

I imagine a setup:


What performance measurement ?


Benefits


Are you aware of any emulator that can to such a thing, or even part of it ?
Title: Re: Using emulator for performance measurement and profiling ?
Post by: ralferoo on 13:41, 30 October 13
WinAPE has a cycle counter. I used to use it by clearing it on a breakpoint, run to the next breakpoint and just read off the total cycles over that time.
Powered by SMFPacks Menu Editor Mod