On Wed, 2010-04-28 at 00:32 +0200, Benjamin Drung wrote: > > The best solution would be autodetection of SSE2 on runtime. That can > be > done with a few lines of code.
You're right, that can indeed be done with a few lines of code. e.g. cpuid instruction. The problem is that you then have to perform a branch every time you could potentially use hardware acceleration: a condition for when, say, SSE2 is available, and another for a generic implementation. It isn't ideal performance wise. Perhaps for 32-bit x86 architectures where SIMD is required, I could build the package for i686 and have it detect at runtime before said is actually used, whether it is available or not. If it is not, raise a user visible error and terminate. This method assumes the user knows that it is only supported on P4 or later generation of x86. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
signature.asc
Description: This is a digitally signed message part