Open
Bug 1056524
Opened 10 years ago
Updated 2 years ago
Remove duplicate MatchPairs when doing "/foo/.exec"
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
NEW
People
(Reporter: h4writer, Unassigned)
References
(Blocks 1 open bug)
Details
We use MatchPairs to store the start and length of every match found by the regexp engine. (Before we create strings out of it). Now it happens often that we have 2 copies of this. [1] Here we always create a temporary MatchPairs. This calls ExecuteRegExp and that function calls ExecuteRegExpImpl [2] Here we run the regexp and the data is stored in the temporary MatchPairs, where after we copy the data in the global MatchPairs if we need to update the global MatchPairs (which we do in most cases). Now we with some reordering we can give the global MatchPairs to the regexp execution instead. Which would remove the need of the temporary MatchPairs. This gives me 5% on octane regexp (on windows) [1] http://dxr.mozilla.org/mozilla-central/source/js/src/builtin/RegExp.cpp?from=regexp.cpp&case=true#613 [2] http://dxr.mozilla.org/mozilla-central/source/js/src/builtin/RegExp.cpp?from=regexp.cpp&case=true#92
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•