CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Benchmarking

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Pyrofer



Joined: 13 Sep 2006
Posts: 16

View user's profile Send private message

Benchmarking
PostPosted: Mon Sep 18, 2006 3:01 am     Reply with quote

What is the easiest way to benchmark a routine in CCS?

Ive been doing lots of optimisations and would like to know how much ive increased the speed, its also usefull to know the absolute time for the routine.

Any suggestions?
Will Reeve



Joined: 30 Oct 2003
Posts: 209
Location: Norfolk, England

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

PostPosted: Mon Sep 18, 2006 4:10 am     Reply with quote

I usually use a spare I/O pin put it high at the start and low at the end and use a scope to measure the pulse width.
Ttelmah
Guest







PostPosted: Mon Sep 18, 2006 4:28 am     Reply with quote

Or run it in MPLAB simulator, reset the stopwatch at the start of the routine, and have a breakpoint at the end.
Similarly, if you have ICE abilities, most of these can be programmed to output a pulse at a particular point. Doing this is also possible with ICD, but has the disadvantage that there is usually a tiing error introduced by the ICD actually outputting the pulse.

Best Wishes
Pyrofer



Joined: 13 Sep 2006
Posts: 16

View user's profile Send private message

PostPosted: Mon Sep 18, 2006 4:46 am     Reply with quote

I like the output pin/pulsewidth idea best. Thats a great trick I didnt think of at all! Thanks.

Ill run the routine multiple times to get a larger sample however for accuracy, but thats such a simple idea I dont know why I didnt think of it.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group