1. A method for selectively performing iterative compare operations between a plurality of overlapping substrings of an input string of characters and a number of success transitions at a current state of a search tree using a state machine, comprising: accessing a bitmap associated with the current state, the bitmap comprising first and second next search size (NSS) bits, wherein the first NSS bit indicates whether a first substring including a first number of input characters is to be compared with the success transitions in a first compare operation, and wherein the second NSS bit indicates whether a second substring including a second number of input characters is to be compared with the success transitions in a second compare operation, wherein the first number of input characters is different than the second number of input characters; performing the first compare operation only if the first NSS bit is asserted to selectively take a first success transition; and performing the second compare operation only if the second NSS bit is asserted and either the first NSS bit is de-asserted or the first compare operation results in a mismatch to selectively take a second success transition.