Faster Math Functions, Soundly
Ian Briggs, Pavel Panchekha

TL;DR
OpTuner is an automatic method that optimizes mathematical function implementations at each use site, significantly speeding up numerical code while maintaining acceptable accuracy levels.
Contribution
The paper introduces OpTuner, a novel tool that automatically selects optimal function implementations across speed-accuracy trade-offs for improved performance.
Findings
Achieved a 9% speedup in the POV-Ray ray tracer without output change.
Matched 216 implementations to 89 use sites across benchmarks.
Demonstrated up to 438% speed-up with minimal accuracy loss.
Abstract
Standard library implementations of functions like sin and exp optimize for accuracy, not speed, because they are intended for general-purpose use. But applications tolerate inaccuracy from cancellation, rounding error, and singularities-sometimes even very high error-and many application could tolerate error in function implementations as well. This raises an intriguing possibility: speeding up numerical code by tuning standard function implementations. This paper thus introduces OpTuner, an automatic method for selecting the best implementation of mathematical functions at each use site. OpTuner assembles dozens of implementations for the standard mathematical functions from across the speed-accuracy spectrum. OpTuner then uses error Taylor series and integer linear programming to compute optimal assignments of function implementation to use site and presents the user with a…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNumerical Methods and Algorithms · Parallel Computing and Optimization Techniques · Algorithms and Data Compression
