Martin,

That is a very good idea. Thank you!

What makes this especially helpful and I'm anoyed I didn't think of it myself, is that an empty app or loop with only the output pulse included, can be used to approximate the overhead of the rest of the system. Effectively giving a potentially more precise measure of the speed of my actual code.

Cheers.
Dion.


On 25/05/10 3:11 PM, Martin Visser wrote:
Dion,

As a soon-to-graduate EE you might consider using a tool such as oscilloscope or frequency counter to help more objectively measure timing. A simple thing to do would be to have your code section run in a repeating loop. At the end of the loop toggle a physical output - say the DTR line on a serial port, or even the Num Lock LED on you keyboard. Connection up your 'scope or meter to that physical interface and measure the frequency. I'm pretty sure these modern time-domain measuring devices are going to have some nice crystal-locked output that should have better than 0.1% or better resolution. Just compare that to your output from time() and see how you go.

Regards, Martin

martinvisse...@gmail.com <mailto:martinvisse...@gmail.com>

--
"Never ascribe to malice that which may adequately be explained by 
incompetence." - Napoleon Bonaparte


--
"Never ascribe to malice that which may adequately be explained by 
incompetence." - Napoleon Bonaparte

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to