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: 63
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: 490
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: 726
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
Xiny6581/Pretzel Log..
j0x
Devia/Ancients
Slator/Arsenic/Stone..
CA$H/TRiAD
pastbytes
Guests online: 144
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.6)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 The Demo Coder  (9.6)
8 Comaland 100%  (9.6)
9 Wonderland XIV  (9.6)
10 What Is The Matrix 2  (9.6)
Top onefile Demos
1 Layers  (9.7)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 Morph  (9.5)
7 Dawnfall V1.1  (9.5)
8 Libertongo  (9.5)
9 Katzen-Video.mp4  (9.5)
10 Onscreen 5k  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Performers  (9.3)
4 Fairlight  (9.3)
5 Triad  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.7)
4 Acidchild  (9.7)
5 Cash  (9.7)

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