[Ffmpeg-devel] int vs. float profiler, take 2

Falk Hueffner falk
Sat May 21 01:32:10 CEST 2005


Mike Melanson <mike at multimedia.cx> writes:

> integer_adder(), 1 adds, 27 cycles used (overhead = 26)

It is completely futile to try to describe the performance of an
operation by a single number. You need at least 3:

* The number of instructions you can launch in parallel (that is, the
  number of functional units capable of issuing it).
* The latency of using the result.
* The latency of using the unit again.

Which of the numbers above is relevant for real code depends a lot on
the code. There's no simple answer.

Moreover, you need to take into account interaction with other
functional units. Also, these tiny test loops often have effects that
don't occur in real code, for example the CPU quickly runs out of
physical registers if it is OOO with register remapping like most
modern CPUs. Real code always has occasional memory accesses.

-- 
	Falk





More information about the ffmpeg-devel mailing list