Bug 233037 - math/gmp should enable assembly optimizations by default
Summary: math/gmp should enable assembly optimizations by default
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-06 19:09 UTC by Dennis Clarke
Modified: 2019-07-16 11:13 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (ale)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Clarke 2018-11-06 19:09:28 UTC
This is more of an RFE than a "bug" but none the less I see that a
build of libgmp will disable the extensive assembly optimizations
by default. This is a significant performance impact by default and
the lib has been tested more than just about any other I know of.
It would be quite dafe and in fact recommended to enable these code
pieces that are hand crafted for certain architectures. 

Given that gmp and mpfr and mpc and isl are required for gcc bootstrap
this has also been tested extensively without any negative side effects.
Comment 1 Alex Dupre freebsd_committer 2018-11-09 16:58:29 UTC
The reason for the option to be disabled is not the instability of the assembly code. Assembly code is not disabled completely (no --disable-assembly configure arg is used), it's enabled for the generic hardware platform (amd64, i386, etc.).
What the CPU_OPT option does is to enable the very processor specific assembly code (eg. haswell cpu), that works only on the same CPU where you built GMP, so it's not suitable for package building.
Comment 2 Dennis Clarke 2019-07-16 11:13:50 UTC
(In reply to Alex Dupre from comment #1)
Sorry I did not follow up on this. 

Brilliant reply and makes perfect sense for a package that needs
to work across a wide array of hardware.