FAT GMP 5 binaries

Torbjorn Granlund tege@swox.com
14 May 2003 16:49:47 +0200


Karl Hasselstrom <kha@treskal.com> writes:

  On 2003-05-14 14:53:44 +0200, Torbjorn Granlund wrote:

  > We need to decide what routines to put in __gmp_cpuvec. All GMP
  > rouines is one choice. All mpn routines or a subset of mpn rouines
  > are other choices.

  The routines that have been hand-coded in assembly are obvious
  candidates for this. For routines written in C, would the speedup be
  worth the effort?

Important routines written in C could call mpn_addmul_1_CPU, directly,
instead of going via __gmp_cpuvec.

  > Internal GMP calls would use __gmp_cpuvec[RNUM_GMP_ADDMUL_1] directly,
  > via some gmp-impl.h macros. The overhead would be a few cycles.

  If a large subset of the GMP functions are cpu-specific, these entry
  decisions need not be done very often; code that has been compiled
  specifically for processor Foo already knows that it wants the Foo
  version of whatever subroutines it calls, so the decision can be done
  at compile-time. The decision only has to be done at run-time when a
  function _not_ in __gmp_cpuvec calls one that _is_ in there.

Precisely.

--
Torbjörn