Prof.O: Measures time taken (in microseconds) of an arbitrary routine.

Started by m_dr_m, 10:47, 20 June 22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

m_dr_m

Thanks to @toms we can measure the exact duration of (almost) any routine!

Use cases:
  • Check a code snippet takes exactly 64 NOPs, without having to count yourself (https://64nops.wordpress.com/2021/01/13/perfectly-accurate-z80-flags-and-cpc-timing/). Note: this involves some manipulation, so that's not yet as handy as with rasm. On the other hand, the manipulation itself can be written down in the source (e.g. in a conditional "IF profiling" section).
  • Measure average/maximum time taken by a music player.
  • Ensure a routine doesn't slow down over modifications, with automated tests.

This is distributed with orgams (http://orgams.wikidot.com/working), but doesn't require orgams.
  • * prof.o: orgams version
  • * prof.asm: ascii version

Powered by SMFPacks Menu Editor Mod