Le mardi 27 avril 2010 à 17:07 -0700, Kip Warner a écrit :
> 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.

The simplest solution is to put the routines in a shared library and to
build two versions of the library. Put the i486 one in /usr/lib and the
SSE2 one in /usr/lib/i686/sse2.

-- 
 .''`.      Josselin Mouette
: :' :
`. `'   “A handshake with whitnesses is the same
  `-     as a signed contact.”  -- Jörg Schilling


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1272449593.27381.6.ca...@meh

Reply via email to