[FFmpeg-devel] FASTDIV macro

ami_stuff ami_stuff
Sat Aug 15 22:47:05 CEST 2009


>>> How do we know which is faster?
>>
>> benchmark
>
> Of the benchmarks we've seen so far (ARM, PPC, x86), all have
> benefited significantly from the table method, although only PPC is
> lacking an asm version.  IMHO we should enable CONFIG_FASTDIV by
> default (possibly dependent on !CONFIG_SMALL), and deal with anything
> where it is slower if we ever find such a machine.

I reduced TESTS_COUNT from 10 to 2.

68040 at 25MHz (GCC 4.4.1 -m68040 -O3 -fomit-frame-pointer):

normaldiv(-1896828497) : time=65.793s
fastdiv_c(-1896828497) : time=66.521s

68060 at 50MHz (GCC 4.4.1 -m68060 -O3 -fomit-frame-pointer):

normaldiv(-1896828497) : time=29.296s
fastdiv_c(-1896828497) : time=52.392s (here GCC uses _muldi3)

Regards




More information about the ffmpeg-devel mailing list