Microoptimizations to subtree search