[XviD-devel] Inlined ASM code again

Christoph Lampert chl at math.uni-bonn.de
Wed Aug 20 21:38:42 CEST 2003


On Wed, 20 Aug 2003, Edouard Gomez wrote:
> Using no inlined code:
> [edy at leeloo:x86_asm] $ ./a.out
> Cycles per call: 40 (up to 42)
> 
> Using inlined code in a simple loop (see [1]):
> [edy at leeloo:x86_asm] $ ./a.out
> Cycles per call: 12

For me it was 48 vs. 11. 

Actually, it was also 11 when completely removing the call! As could be 
expected, the number was the pure overhead, the call itself was analyzed
to not modify any mem and then simply removed... 
When I prohibited that, cycle count went up to 27.

Then I modify the loop to not calc SAD from the same position again
and again, but keeping one pointer fixed aligned and one cycling through a
1 MB area with stride 720 (not "realistic", but "more realistic"), I get: 

58 vs 27   for adding 1 to the pointer per iteration.
69 vs 38   for adding 8 to the pointer per iteration
250 vs 211 for adding 720 to the pointer, same for 64.

gruel




More information about the XviD-devel mailing list