Improve use of datastructures to make candidate selection 1.6x faster