How to measure number of cycles of a C code
-
Hi, I have written a C code of an encryption algorithm. How do I measure the number of cycles of my implementation? Hope to get some feedbacks/suggestion from the forum members, or can email the feedbacks to my email address watija@yahoo.com. Regards, Tiza Naziri, Malaysia
-
Hi, I have written a C code of an encryption algorithm. How do I measure the number of cycles of my implementation? Hope to get some feedbacks/suggestion from the forum members, or can email the feedbacks to my email address watija@yahoo.com. Regards, Tiza Naziri, Malaysia
just put a Counter(an
unsigned int
orlong
or anthing like that) in yourCycling Function
( :-D ) i.e. encryption algorithm. and every time the Encryption Algorithm make a cycle,increment
theCounter by one
, and when your cycling function end, you will get number of cycles in theCounter
"I Think this Will Help"
visit me at http://www.thisisalok.tk
-
Hi, I have written a C code of an encryption algorithm. How do I measure the number of cycles of my implementation? Hope to get some feedbacks/suggestion from the forum members, or can email the feedbacks to my email address watija@yahoo.com. Regards, Tiza Naziri, Malaysia
-
Hi, I have written a C code of an encryption algorithm. How do I measure the number of cycles of my implementation? Hope to get some feedbacks/suggestion from the forum members, or can email the feedbacks to my email address watija@yahoo.com. Regards, Tiza Naziri, Malaysia
if you want to know CPU cycles (ex. "it takes X cycles to do one round"), you'll have to analyze a machine-language implementation of your algorithm. Image Toolkits | Image Processing | Cleek