Light and fast algorithm for traversing sparse node graphs or decision trees.