Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Count raw cycles of an execution (ignore VIC-stealed cycles) in VICE?
2022-02-28 17:25
wil

Registered: Jan 2019
Posts: 66
Count raw cycles of an execution (ignore VIC-stealed cycles) in VICE?

Is there an easy way to measure the execution time of an assembler program with VICE?

I know VICE has the CPU cycle counter and even a function for displaying/resetting the cycle counter (stopwatch, by the way, this can be abbreviated with sw, although this feature is not documented) but the cycle counter counts clock cycles also when the CPU is halted due to a VIC memory access.

However, I would like to measure the net used cycles instead of the clock cycles passed.

Currently, I am switching VIC off (0 -> $d011) and waiting for a new frame (and, of course, switch off IRQ) to do my measurements. But I wonder if there is a more elegant version, probably an executed clock cycle counter buried somewhere in VICE?
 
... 10 posts hidden. Click here to view all posts....
 
2022-03-04 07:47
oziphantom

Registered: Oct 2014
Posts: 502
you can run the function with this https://github.com/martinpiper/BDD6502 and it will tell you how many cycles the "test ran for"
2022-03-08 14:36
Martin Piper

Registered: Nov 2007
Posts: 739
Adding on to what Ozi wrote. BDD6502 was expanded a little while ago to allow code to be executed and cycle counts to be checked automatically.

For example this example test: https://github.com/martinpiper/BDD6502/blob/master/features/Per..

This allows 6502 code to be checked for expected performance over a range of inputs/memory states. Most useful for performance testing to make sure code tweaks are still within budget while maintaining correct functionality.

I use it extensively for checking code as part of an automated build before even getting to run it in Vice and test manually.
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Fred/Channel 4
encore
Peacemaker/CENSOR/Hi..
master_hacker
New Design/Excess
MWR/Visdom
enthusi/PriorArt
Didi/Laxity
Guests online: 199
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Jeroen Tel  (9.7)
3 Stinsen  (9.7)
4 LMan  (9.7)
5 Linus  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.084 sec.