measuring execution time of assembler routines

Страница 1/2
| 2

By santiontanon

Paragon (1806)

Аватар пользователя santiontanon

22-05-2016, 00:44

Hi all, quick question, is there a good way to measure the number of CPU ticks (M cycles or T cycles) that a given assembler routine takes to execute? (other than doing it manually Smile)

I'm playing around with some little project, and very quickly my code grew into something that cannot be run at 50 frames per second (and most likely because it's grossly inefficient, since I'm still learning Smile)

Thanks in advance!

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By ricbit

Champion (438)

Аватар пользователя ricbit

22-05-2016, 01:30

The best way by far is to use TCL scripts in openmsx, this way you can have cycle-accurate measures for Z80 code.

By santiontanon

Paragon (1806)

Аватар пользователя santiontanon

22-05-2016, 07:56

Thanks to both!

@ricbit: I'm new to all of this MSX assembler world, so, I'm not familiar with the tools, etc. Do you have any example of TCL script for openmsx to do something similar, so I could adapt?

@Bit Addict: thanks for the link! I might try Grauw's script (Sandy's profiler is for Windows, and thus I can't use...)

By ARTRAG

Enlighted (6935)

Аватар пользователя ARTRAG

22-05-2016, 08:30

This is for small routines

http://msx.jannone.org/bit/

By ricbit

Champion (438)

Аватар пользователя ricbit

22-05-2016, 13:55

@santiontanon Grauw's script is a great example of tcl script profiling

By santiontanon

Paragon (1806)

Аватар пользователя santiontanon

22-05-2016, 16:29

Oh wow! that link is great ARTRAG, thanks! I'll play around with that and if I need something more powerful, then I'll go with the TCL script. Thanks a lot guys, this really helped Smile

By hit9918

Prophet (2932)

Аватар пользователя hit9918

22-05-2016, 20:21

just change the color register at start and end of the code in question.
you get a real life dynamic cpu usage equalizer display.

By Metalion

Paragon (1625)

Аватар пользователя Metalion

23-05-2016, 10:29

ARTRAG wrote:

This is for small routines
http://msx.jannone.org/bit/

I get an "Account Suspended" page ... :(

By ARTRAG

Enlighted (6935)

Аватар пользователя ARTRAG

23-05-2016, 10:49

Strange, it was active till Friday

By Grauw

Ascended (10768)

Аватар пользователя Grauw

23-05-2016, 15:30

It works for me now.

Страница 1/2
| 2