Algorithm::Diff::XS is a Perl diff utility module based on Joe Schaefer's excellent but not very well-known Algorithm::LCS module, with a drop-in interface identical to Algorithm::Diff. . Note that only the LCSidx function is optimized in XS at the moment, which means only compact_diff will get significantly faster for large data sets, while diff and sdiff will run in identical speed as Algorithm::Diff.