Put the pattern compilation out of line of the function for increased performance.