March 2024
Intermediate to advanced
428 pages
12h 6m
English
When we looked at trading resources in the last chapter, you had to choose between RAM, code space, and processing cycles. Trading these resources goes only so far. Sometimes you need to make your code go faster. Not knowing what you’ll need for your system, I can still guess that you’ll need to implement some math (because that is where processors excel).
The less your system does, the fewer resources it needs to do it. Sometimes we confuse accuracy, which is important, with precision, which can go too far. If you can quantify the range of data you expect and your error budget, there are some useful methods to reduce unnecessary precision for all sorts of algorithms, thereby saving RAM and processing cycles.