3 ms·
> no FPU. How much of a hit does floating point math take? I have a desire to build some realtime audio tools.
by raytracer 8y ago
> no FPU.
How much of a hit does floating point math take? I have a desire to build some realtime audio tools.
- justincormack 8y agoThe wording is confusing it does support fpu it doesn’t support machines without fpu.
- DarkWiiPlayer 8y agoIt seems pretty clear to me. It doesn't support "no fpu". It's a lazy way of putting it though and "Architectures without FPU" would have been clearer.
- pygy_ 8y agoAFAIK it is not about float perf. LuaJIT uses NaN-tagging to represent Lua values in memory to save space. Float64 numbers can be left alone, and other types are represented as NaN with the pointer bits stashed in the mantissa part of the float. Only one, canonical NaN value is recognized as such by the language, the others are disguised 32 bit pointers.
- cordite 8y agoOn microcontrollers, you might as well change to lookup tables if you are trying to do something real-time with more than 100 operations per millisecond. This varies by microcontroller obviously.. this comes from reimplementing GLSL shadertoy samples for a neopixel grid.
- lukego 8y agoRealtime audio sounds like a good domain. You might also want to check out LuaRadio if you haven't already. http://luaradio.io/ http://luaradio.io/