• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..22-Apr-201644

distfilesH A D27-Nov-2015105

ManifestH A D27-Nov-20151.1 KiB

mpih-add1.SH A D27-Nov-20152.8 KiB

mpih-lshift.SH A D27-Nov-20154.7 KiB

mpih-mul1.SH A D27-Nov-20152.5 KiB

mpih-mul2.SH A D27-Nov-20152.6 KiB

mpih-mul3.SH A D27-Nov-20152.6 KiB

mpih-rshift.SH A D27-Nov-20154.7 KiB

mpih-sub1.SH A D27-Nov-20153.1 KiB

READMEH A D27-Nov-20151.1 KiB

README

1This directory contains mpn functions optimized for Intel Pentium
2processors.
3
4RELEVANT OPTIMIZATION ISSUES
5
61. Pentium doesn't allocate cache lines on writes, unlike most other modern
7processors.  Since the functions in the mpn class do array writes, we have to
8handle allocating the destination cache lines by reading a word from it in the
9loops, to achieve the best performance.
10
112. Pairing of memory operations requires that the two issued operations refer
12to different cache banks.  The simplest way to insure this is to read/write
13two words from the same object.  If we make operations on different objects,
14they might or might not be to the same cache bank.
15
16STATUS
17
181. mpn_lshift and mpn_rshift run at about 6 cycles/limb, but the Pentium
19documentation indicates that they should take only 43/8 = 5.375 cycles/limb,
20or 5 cycles/limb asymptotically.
21
222. mpn_add_n and mpn_sub_n run at asymptotically 2 cycles/limb.  Due to loop
23overhead and other delays (cache refill?), they run at or near 2.5 cycles/limb.
24
253. mpn_mul_1, mpn_addmul_1, mpn_submul_1 all run 1 cycle faster than they
26should...
27