I want a variant of commonPrefix(a, b) at http://dlang.org/phobos/std_algorithm.html#commonPrefix that only counts returns the length of commonPrefix(a, b) Is commonPrefix lazy enough to make commonPrefix(a, b).count as fast as zip(a, b).count!(ab => ab[0] == ab[1]) ?