The Fastest Edit Distance
So far in this chapter we’ve improved the implementation of our code by making changes to the algorithms and underlying data structures that we’re using. Algorithms and data structures are always a good place to start when we need to make our programs more efficient, but once we’ve addressed those opportunities we can often still realize significant performance improvements by making use of micro-optimizations. These are optimizations that tend to have a small individual impact, but can add up collectively. In this section, we’ll look at a version of the editDistance function that has had several different micro-optimizations applied. Before we look at the code though, let’s take a moment to review the progress that ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access