# How to calculate cycles per byte [duplicate]

Sometimes, websites and scientific papers that introduce and/or handle cryptographic algorithms also provide speed-analysis and tables comparing the individual performance of cryptographic implementations. I would like to do the same, but I'm not sure how to calculate the “cycles”.

I have this data:

• processor clock frequency: 2,1 ghz
• message length: 16 byte
• Speed: 4,3 Mbytes/s

How can I calculate “cycles” and “cycles per byte” from that data?

-

## marked as duplicate by e-sushi♦May 14 at 18:59

Welcome to Crypto.SE! Please note that this question is off-topic, and in general the community expects someone to do some research before asking a question. – rath May 18 '13 at 21:21
I'm voting to leave closed since whilst this is now a clear and well-worded question I think it's still off-topic for this site: its about measuring computational speed, albeit the speed of a cryptographic algorithm. – figlesquidge Mar 25 '14 at 10:59

$\displaystyle \text{cycles per byte} = \frac{\text{cycles per second}}{\text{bytes per second}} = \frac{2.1 ~ \text{GHz}}{4.3 ~ \text{MiB}} = \frac{2.1 \times 10^9}{4.3 \times 1024^2} \approx 466 ~ \text{cpb}$