Asm code selection made hard

Torbjörn Granlund tg at gmplib.org
Sat Sep 5 16:47:09 CEST 2026


An example of cycle counts for mul_basecase for two 50-limb operands:

      alder    bd1     bt1    core2   has-     broad-  sandy    k8     zen
      lake                            well     well    bridge

  E    5.41    1.51    2.58    1.55    3.06    1.36    1.34    2.09    2.09
  P    0.97    1.11    1.33    1.16    1.03    1.20    1.26    1.30    1.32


The code developed for Intel's Alder Lake's E cores, runs well on the
Lion Cove cores at less than 1 cycle/limb.  All code variabts run
decently on the P cores.

But the E cores are much less robust, with results varying from 1.34 to
more than 5 cycles/limb.

And here is the crux: the code that is the fastest for the P cores is
the slowest for the E cores.

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list