April 2018
Intermediate to advanced
408 pages
10h 42m
English
In some cases, it might help to look at intermediate objects as a history of the computation. What's important is that the history of a computation is not fixed. When functions are commutative or associative, then changes to the order of evaluation might lead to different objects being created. This might have performance improvements with no changes to the correctness of the results.
Consider this expression:
>>> 1+2+3+4 10
We are looking at a variety of potential computation histories with the same result. Because the + operator is commutative and associative, there are a large number of candidate histories that lead to the same result.
Of the candidate sequences, there are two important alternatives, which are ...