test faster than match

For details, see http://jsperf.com/match-test-pos-neg