[XviD-devel] Inlined ASM code again

skal skal at planet-d.net
Fri Aug 22 10:38:18 CEST 2003


	Hi Marco and all,

On Fri, 2003-08-22 at 04:30, Marco Al wrote:
> From: "skal" <skal at planet-d.net>
> 
> > But eventually, the only conclusion you may end up
> > with, when inlined gcc gets better than NASM, is...
> > that this latter could have been better written.
> 
> You cannot get rid of function call overhead with
> NASM alone, your only option is to move the outer
> loops to assembly too (great option that is :).
> 
	note that speed up gain from inlined (long) code often
	comes from better pairing / optimizing with
	the code just above and below the inlined
	func, rather than func call overhead removal
	(especially on modern CPU, with all those
	code caches)...

	Also: 
	IMHO (expressed here: skal.planet-d.net/coding/vademecum.html 
	as rule #1 :), one should first focus on *not* calling
	a func before optimizing it, especially when it come to
	weird compile flag fiddling :)
	(in a present case, sad16 is a ~100 tick, func.Hence: if you
	manage to not call it inappropriately say 10 times in a qcif
	pic, you'll have gained your day).
	
	ok, off with this topic. Later!

		Skal







More information about the XviD-devel mailing list