Use MPI comba and mulq optimizations on x86-64 MacOS.
Categories
(NSS :: Libraries, enhancement, P1)
Tracking
(Not tracked)
People
(Reporter: kjacobs, Assigned: kjacobs)
Details
Attachments
(1 file)
Bug 272327 added s_mpv_mul_set_vec64/s_mpv_mul_add_vec64 assembly implementations in mpi_amd64_gas.s. Bug 227049 translated this file to mpi_amd64_masm.asm for Windows. No macho64 variant exists, but it's worth adding as these implementations improve RSA public key operation throughput by 2x.
Further, the functions in mp_comba.c give a ~15% additional improvement on Mac and can be used as-is.
| Assignee | ||
Comment 1•10 months ago
•
|
||
This patch makes two MPI changes for MacOS:
- Rename
mpi_amd64_gas.stompi_amd64_common.Sand add defines for macho64, allowing Intel Macs to take advantage of the 64x64->128 multiply code. - Define and use
NSS_USE_COMBAon Intel Macs.
Performance results with rsaperf -n none -p 10 -e -x 65537 (default 2048-bit key):
Before: 12629.12 operations/s. one operation every 79 microseconds
With 64x64->128 assembly: 29431.65 operations/s. one operation every 33 microseconds
With MP_COMBA and 64x64->128 assembly: 30332.99 operations/s. one operation every 32 microseconds
Updated•10 months ago
|
Updated•10 months ago
|
| Assignee | ||
Comment 2•10 months ago
|
||
Description
•