July 2023
Intermediate to advanced
670 pages
17h 13m
English
Memoization has gotten us quite far along the path of building a sufficiently fast spellchecker, but we’re still not fast enough. In this section, we’ll look at another factor that can impact the performance of our programs: the shape of our data structures and the way we store and access memory in our programs.
You saw in the last section that when we started using ST to memoize a map of results, we ended up taking a significant performance penalty. It turns out that when we’re trying to get the best performance out of our applications, there are a few factors we need to think about beyond algorithmic complexity:
Avoiding indirection by having too many thunks that need to be evaluated for any particular ...
Read now
Unlock full access