Comments (2)
If you've found a specific case where the lack of #[inline]
causes a performance problem for you then we are happy to accept a PR to add the #[inline]
back.
from libm.
I benchmarked every function with #[inline]
vs. as-is, and there are a few considerable improvements. On my machine (x86_64 Arch Linux, Ryzen 7 5800H) I got these significant results - though I'd appreciate someone on a different system/architecture running a bench as well:
atan
: 3 -> 2 ns/iteratan2
: 6 -> 5 ns/itercosf
: 4 -> 2 ns/itercoshf
: 4 -> 3 ns/iterexpm1f
: 3 -> 2 ns/iterhypot
: 4 -> 2 ns/iterhypotf
: 2 -> 1 ns/itersinf
: 5 -> 2 ns/itertan
: 4 -> 3 ns/itertanf
: 7 -> 2 ns/itertanh
: 8 -> 6 ns/iter
I only included results where #[inline]
helped by >10% but I will do more runs and average out results before doing any proper PR, for now just want to put this out there
from libm.
Related Issues (20)
- Incorrect value of sin(13.11250158914107) on x87 HOT 5
- Cortex-M4F: 'libm::sin()' is 2 times slower than 'sin()' of C newlib-libm HOT 2
- Running musl-reference-tests is impossible outside linux (and still nontrivial to run on linux)
- Pure 32-bit versions of 32-bit math functions HOT 6
- failed to compile targeting avr HOT 5
- Proving IEEE-754 2008 compliance for all sqrt/sqrtf implementations on all platforms. HOT 1
- aarch 64 compilation failure. HOT 2
- Make all symbols weak? HOT 1
- floor(), floorf(), ceil() and ceilf() Don't actually work on no-std (linker error) HOT 7
- Some functions are producing a different result than musl
- Const eval support HOT 1
- Incorrect `fmaf` results on some inputs HOT 2
- Attempt to negate with overflow in `fma`
- Cargo test fails in x86_64-pc-windows-msvc target HOT 1
- Using rint/rintf instead of roundeven/roundevenf appears to break target_arch = "spirv" for spirv-std HOT 1
- Possible errors in some constants? HOT 2
- specify MSRV
- Next release? HOT 1
- Incorrect exponent calculation in the nextafter implementations leads to missed overflow/underflow signals
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libm.