Contribute to RRSP or pay off mortgage?

Does it make sense to put some extra cash into an RRSP or use it to help pay off part of a small mortgage?