Currently, all RegExpMatchesArray object contain Vector<int, 32>, used to hold any sub-pattern results. This makes allocation/construction/destruction of these objects more expensive. Instead, just store the main match, and recreate the sub-pattern ranges only if necessary (these are often only used for grouping, and the results never accessed). If the main match (index 0) of the RegExpMatchesArray is accessed, reify that value alone.
Created attachment 132972 [details] Fix
Attachment 132972 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1 Source/JavaScriptCore/runtime/RegExpObject.h:29: Code inside a namespace should not be indented. [whitespace/indent] [4] Source/JavaScriptCore/runtime/RegExpObject.h:120: The parameter name "string" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 132972 [details] Fix r+ Please fix the style issues. What is the performance implication of this change?
Fixed in r111603.
Comment on attachment 132972 [details] Fix Clearing review flags as comments imply this has landed.