Hacker News new | ask | show | jobs
by raytracer 2803 days ago
> no FPU.

How much of a hit does floating point math take? I have a desire to build some realtime audio tools.

4 comments

AFAIK 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.

Realtime audio sounds like a good domain. You might also want to check out LuaRadio if you haven't already. http://luaradio.io/
On 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.

The wording is confusing it does support fpu it doesn’t support machines without fpu.
It 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.