Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / [SOLVED] Quick way of monitoring performance of a loop/function?

Richard Stevens
User Offline
Joined: 14th Jan 2020
Posted: 7th Aug 2020 14:03 Edited at: 7th Aug 2020 14:07
Back in the olden days of blitz basic on the Amiga, a common trick to see how your code was performing was to poke the border color at the start of a chosen loop, then poke it back again at the end of it. (or something along those lines.. it was a very long time ago!)

This would give you a very quick & dirty visual guide as to how much of a frame each of your functions was taking up, depending on how much of the border was colored, and hence what was worth optimising and what wasn't (I'm finding I can be incredibly lazy with an I5 compared to a motorola 68020!)

Is there a similar trick for AppGameKit that anyone knows of?

The author of this post has marked a post as an answer.

Go to answer

Valued Member
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 7th Aug 2020 20:11 Edited at: 7th Aug 2020 20:14
This post has been marked by the post author as the answer.
If i want to know how fast my code is, I run in with unlimited fps using SetSyncRate ( 0,1 ) and see how many frames I get.
If you want test test a specific complex function that you can't run or isolate without running the full code, you can always measure who long it takes the function to run by taking the time at the start and the end of the function.

There are also a lot of specific benchmark functions:

Coders don't die, they just gosub without return
Richard Stevens
User Offline
Joined: 14th Jan 2020
Posted: 16th Aug 2020 17:52
Thanks PSY, I'll write a little function to display the time used as on a chosen loop as a graphic.

Login to post a reply

Server time is: 2020-12-04 11:20:50
Your offset time is: 2020-12-04 11:20:50