Improved time and space efficiency when only some pairs are needed.