We study a class of finite state machines, called w-matching machines, which yield to simulate the behavior of pattern matching algorithms while searching for a pattern w. They can be used to compute the asymptotic speed, i.e. the limit of the expected ratio of the number of text accesses to the length of the text, of algorithms while parsing an iid text to find the pattern w. Defining the orde...