[Ffmpeg-devel] int vs. float: Hard Numbers

Attila Kinali attila
Sat May 21 15:45:08 CEST 2005


On Sat, 21 May 2005 01:04:05 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:

> > For another test i added a for loop infront of each test function
> > with 1000 iterations to check for cache dependencies. Interestingly
> > i got exactly the same numbers as before. 
> 
> i guess the function was inlined so it wasnt in the code cache after the loop, 
> only the inlined one inside the loop was, but thats just a guess

Nope, it wasn't inlined.

> > I assume that the 2MB L2 
> > cache still contains the content of the program from the loading
> > operation of the OS.
> 
> yes probably but L2 != L1, and L1 is normally split between data and code, so 
> the code must have been executed to be in the L1 cache

I just had a better idea for an explanation: the whole measuring
code fits into two L1 cache lines, thus, the L2 cache is accessed
at most 2 times during the measurment period. Thus maximum penalty
that could be measured would be 10 cycles on my CPU. It could now
be, that these 10 cycles are consumed by the long pipeline. Ie
that even if the beginning of the pipeline has to wait for the
code to come from L2, it will catch up when the interger unit
is processing the additions.
Please note that this is a wild guess that i cannot back up
with data, but that would be the way i'd do it if i had to
design a pipeline.

				Attila Kinali


-- 
?????????





More information about the ffmpeg-devel mailing list