Use PatternType in PatternField.
Refactoring PatternField.
Add new performance test.