Calculating cycles per byte Cycles per byte seems to be a critical concern in designing and choosing stream ciphers. For example, from Wikipedia, RC4 has 7 cycles/byte on original Pentium chips.

How is this calculated? Do they just time the encryption of multiple megabytes and then divide by the CPU's clock speed? Do they look at the assembly code and lookup cycle per instruction in some table, figuring in pipelining, branch prediction, etc.?
They measure it.

Once upon a time, CPUs were simple enough that you really code compute the amount of time for a stretch of code by looking up the clocks per instruction in the manual, add them all together, and that'd be the total time.

However, CPU manufacturers have added more and more optimizations and parallelism; this makes the CPUs run faster (for example; using memory caches, executing instructions in a pipeline, executing instructions out of order), however it becomes increasingly difficult for someone to look at some code and generate an estimate.

So, instead of trying to deal with the complexity, we just measure it.