It is interesting to read how Haskell optimized the algorithm based on the instrinsic properties of the data structures. In contrast, C compilers leveraged on the knowledge of the underlying machine. It is amazing how far Haskell compilers have come.