That’s why it’s a low-level system programming language that prioritizes working very well on x86-64 over supporting other platforms like 32-bit heap, MIPS, Xbox, no FPU, etc. Just got bigger fish to fry right now.
That’s why it’s a low-level system programming language that prioritizes working very well on x86-64 over supporting other platforms like 32-bit heap, MIPS, Xbox, no FPU, etc. Just got bigger fish to fry right now.
How much of a hit does floating point math take? I have a desire to build some realtime audio tools.
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.
This varies by microcontroller obviously.. this comes from reimplementing GLSL shadertoy samples for a neopixel grid.