06-27-2025, 04:21 PM
Quote:Apparently not always, as per the times posted above yours. SINGLE is faster without integer division, which really blows my mind! I really wonder what type of machine/architecture gives such results.Indeed, amazing. I wouldn't have thought so. - I googled it: Single-point division is faster than integer division
Quote:Yes, floating-point division can be faster than integer division under certain circumstances, especially if the processor has an efficient floating-point unit (FPU) and the hardware support for floating-point operations is optimized. However, this depends heavily on the specific hardware, the compiler used, and the exact data.
. . .
In summary:
While integer division can be faster in some cases, especially when high precision is not required or when the result needs to be rounded to an integer, floating-point division is often faster when the processor has a well-optimized FPU and the compiler adjusts the code accordingly. The actual speed depends on many factors and can therefore vary.

