MCPcopy Create free account
hub / github.com/google/re2j / programSize

Method programSize

java/com/google/re2j/Pattern.java:313–315  ·  view source on GitHub ↗

Returns the program size of this pattern. Similar to the C++ implementation, the program size is a very approximate measure of a regexp's "cost". Larger numbers are more expensive than smaller numbers. @return the program size of this pattern

()

Source from the content-addressed store, hash-verified

311 * @return the program size of this pattern
312 */
313 public int programSize() {
314 return re2.numberOfInstructions();
315 }
316
317 /**
318 * Returns the number of capturing groups in this matcher's pattern. Group zero denotes the entire

Callers 2

testProgramSizeMethod · 0.95
testProgramSizeMethod · 0.95

Calls 1

numberOfInstructionsMethod · 0.80

Tested by 2

testProgramSizeMethod · 0.76
testProgramSizeMethod · 0.76