[XviD-devel] Re: Automatic benchmark / compile

Felix von Leitner xvid-devel@xvid.org
Sun, 19 Jan 2003 04:08:17 +0100


Thus spake Christoph Lampert (chl@math.uni-bonn.de):
> Since it's very well 20% or more of a difference between "defaults" and
> "optimal", I wanted to include a small shell-script into XviD
> build/generic that could do some kind of automatic benchmarking and set
> compiler option accordingly (or at least output the values, so everyone
> can create his own CFLAGS ).

No, don't do that!  I want to compile my xvid on my fast Athlon but use
the binary on my slow C3, for example!

The best way to do this is to have different versions in the binary, run
them all five times on a warmed cache, and take the lowest cycle count
of the five.  Then choose the function with the lowest count.

> * Does anyone else of you with knowledge in /bin/sh programming volunteer
> for that?

I know how to do it, but it really is a bad idea.

> * Is there a similar method for Windows?

Who cares? ;)

Felix