public void benchMarkPatternMatching() {
        Pattern identifierRegexp = Pattern.compile("[A-Za-z0-9_][A-Za-z0-9_-]*");
        String[] strings = new String[1000];
        for (int i = 0; i < strings.length; i++) {
            strings[i] = i + "-legal_string" + i;
        }

        countValid(strings, 1000, "handcoded warmup", FeatureNames::needsQuoting);
        countValid(strings, 1000, "regexp warmup", (s) -> identifierRegexp.matcher(s).matches());

        countValid(strings, 100000, "handcoded", FeatureNames::needsQuoting);
        countValid(strings, 100000, "regexp", (s) -> identifierRegexp.matcher(s).matches());
    }
Tests rank feature names.

@author bratseth
searchlib/src/test/java/com/yahoo/searchlib/ranking/features/FeatureNamesTestCase.java