OCL: backport of matchTemplate perf tests from master