chapel-lang/chapel — pull request #99 by benharsh (2014-08-01 18:38:22+00:00)
Title: Regex: Cache string size to improve performance for large strings in matches iterator

In the regex-dna shootout, we need to count the number of matches in a very large string. With the current state of strings, calling text.size invokes strlen. Calling strlen on this very large string every time we look for a match is very slow. By caching the string's length, the performance of this iterator improves immensely.