Get the latest tech news
Fixed-point arithmetic as a replacement for soft floats
Pigweed Blog #4: Fixed-point arithmetic as a replacement for soft floats# Published on 2024-09-03 by Leonard Chan Fixed-point arithmetic is an alternative to floating-point arithmetic for representing fractional data values (0.5, -1.125, 10.75, etc.). Fixed-point types can be represented as scaled integers.
We’ve observed a~2x speed improvement in classification algorithms and a small decrease in binary size using fixed-point without sacrificing correctness. Platforms that don’t support hard floats normally need to make a call to a library function that implements the floating-point equivalents of these which can be large or CPU-intensive. It’s worth noting that individual fixed-point binary operations are slightly larger since they involve a bunch of shifts or saturation checks.
Or read this on Hacker News