Simplify sequence length difference computation