Increased efficiency
Patterns are now compiled only once. Thanks to FrozenBrain for this
suggestion. :)