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

Mike Melanson mike
Sat May 21 01:05:30 CEST 2005


Hi,
	Since the first version of my little profiler generated a reasonable 
amount of activity, attached is a slightly improved version. This one 
does the following:

* runs all 4 of the functions n times as a cache warmup (n=1000 in the 
code); this actually does help with cycle count consistency
* fetches an overhead cycle count as a baseline
* C code can fetch iteration count

The ASM code has ITERATIONS set to 1 right now. I would be interested to 
know the results from varying CPUs using 1, 10, and 100 iterations.

	Results from my VIA P3-class CPU:

   warming up with 1000 cycles...
integer_adder(), 1 adds, 27 cycles used (overhead = 26)
float_adder(), 1 adds, 27 cycles used (overhead = 26)
integer_mult(), 1 mults, 34 cycles used (overhead = 28)
float_mult(), 1 mults, 27 cycles used (overhead = 26)

   warming up with 1000 cycles...
integer_adder(), 10 adds, 36 cycles used (overhead = 26)
float_adder(), 10 adds, 36 cycles used (overhead = 26)
integer_mult(), 10 mults, 115 cycles used (overhead = 28)
float_mult(), 10 mults, 36 cycles used (overhead = 26)

   warming up with 1000 cycles...
integer_adder(), 100 adds, 156 cycles used (overhead = 26)
float_adder(), 100 adds, 576 cycles used (overhead = 26)
integer_mult(), 100 mults, 925 cycles used (overhead = 28)
float_mult(), 100 mults, 578 cycles used (overhead = 26)

The benchmark still suffers from the result dependency problem. But the 
same problem comes up in the multimedia decoding algorithms, right? If 
the multiplications were parallelizable, wouldn't we be using 
SSE/SSE2/AltiVec instructions to parallelize them?

	Thanks...
-- 
	-Mike Melanson
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: main.c
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050520/b050a059/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050520/b050a059/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: math.asm
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050520/b050a059/attachment-0001.asc>



More information about the ffmpeg-devel mailing list