mirror of https://github.com/apache/lucene.git
Ban use of Math.fma across the entire codebase (#12014)
When FMA is not supported by the hardware, these methods fall back to BigDecimal usage which causes them to be 2500x slower. While most hardware in the last 10 years may have the support, out of box both VirtualBox and QEMU don't pass thru FMA support (for the latter at least you can tweak it with e.g. -cpu host or similar to fix this). This creates a terrible undocumented performance trap. Prevent it from sneaking into our codebase.
This commit is contained in:
parent
945d7fe027
commit
3ac71adbdf
|
@ -66,3 +66,6 @@ javax.naming.spi.ContinuationDirContext
|
||||||
javax.sql.rowset.spi.ProviderImpl
|
javax.sql.rowset.spi.ProviderImpl
|
||||||
javax.sql.rowset.spi.SyncFactory
|
javax.sql.rowset.spi.SyncFactory
|
||||||
|
|
||||||
|
@defaultMessage Math.fma is insanely slow (2500x) in many environments (e.g. VMs). Use multiply/add and suffer the extra rounding
|
||||||
|
java.lang.Math#fma(float,float,float)
|
||||||
|
java.lang.Math#fma(double,double,double)
|
||||||
|
|
Loading…
Reference in New Issue