A fast linear-time algorithm for inversion distance with an experimental comparison