[XviD-devel] Encoder amazing speedup... well not that true :-)
Edouard Gomez
ed.gomez at free.fr
Fri Aug 20 01:14:10 CEST 2004
Hey,
ok ok the subject was just for teasing.
I've been working a lot with oprofile and the encoder trying
to kill some nasty hotspots in our code when using default
settings (except bratio and boffset maybe, but whetever)
I only worked on one function at the moment and here are the
results:
* samples % image name symbol name
* 982540 7.5382 libxvidcore.so.4.0 CodeCoeffIntra_CalcBits <-- old
* 617040 4.6882 libxvidcore.so.4.0 CodeCoeffIntra_CalcBits <-- new
So the function now eats ~40% less cycles. Global speedup
as you can see is ~3%.
I think now the flat profile is quite nice with nearly
everything < 5% except the fdct. Well balanced scores.
So now i'm starting looking at memory usage (cache misses
tlb misses etc etc) Maybe i'll finally achieve more
impressive speedups :-)
Profiles available there:
http://ed.gomez.free.fr/vrac/encode-new.oprofile.c
http://ed.gomez.free.fr/vrac/encode-old.oprofile.c
The profiled code follows the flat profiles, so you can
see what trick i use... basicly i favorize zero block
scanning w/o requiring a triple indirection
(i>zigzag>qcoeff), that speeds up this common case quite
a lot as it cuts the number of cases where we actually
touch zigzag and these nasty inderections that slowdown
the functions.
Thanks to Nicolas Boulay for helping me out analysing
the profiles and givin me ideas.
Ps: atm the code isn't 1:1 with old one, i'll have a look
later, it's probably a problem with indexes
--
Edouard Gomez
More information about the XviD-devel
mailing list