January 2019
Intermediate to advanced
320 pages
9h 18m
English
This chapter covers
Calculations take time. Say you have two matrices—A and B—and you’re told you may need their product at some point. One thing you could do is to immediately calculate the product, and it’ll be ready when you need it:
auto P = A * B;
The problem is that you may end up not needing the product at all—and you wasted your precious CPU cycles calculating it.
An alternative approach is to say if someone needs it, P should be calculated as A * B. Instead ...
Read now
Unlock full access