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 ...

Get Effective Haskell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.