Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#43027 - [gmp] enable runtime cpu detection

Attached to Project: Arch Linux
Opened by Fnord Popos (noddy) - Saturday, 06 December 2014, 20:11 GMT
Last edited by Allan McRae (Allan) - Sunday, 15 February 2015, 04:58 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

GMP is a performance-sensitive piece of code for many users. To cater to that, it contains a large number of alternative implementations of its core routines, tuned for various processors and taking advantage not only of instructions available, but also pipeline lengths, specific durations of various instructions and prefetching behavior. (See for example /mpn/x86_64 in the tarball.)

Unfortunately, if you just go "./configure --build=${CHOST}" it will run config.guess, which detects the cpu on the machine it is being built on, and compile only the code tuned for the detected machine.

But fortunately, if you further add "--enable-fat" (see [1]) to the configure line, it adds a cpu dispatcher and all of the chip variations into the binary.

I easily get 15% improvements with a fat binary on my i7 Sandy Bridge, and I assume the cpu is similar to the build machine. People with more significantly different chips should see larger benefits. The cost is bumping the library size by about 100K.

Could you please add this to the PKGBUILD?

[1] - https://gmplib.org/manual/Build-Options.html
This task depends upon

Closed by  Allan McRae (Allan)
Sunday, 15 February 2015, 04:58 GMT
Reason for closing:  Implemented
Additional comments about closing:  gmp-6.0.0-2

Loading...