Investigate using global mode in irregexp

NEW
Unassigned

Status

()

Core
JavaScript Engine: JIT
3 years ago
3 years ago

People

(Reporter: bhackett, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Created attachment 8425869 [details] [diff] [review]
patch (f06a7deabcb9)

Irregexp supports allowing jitcode to find all matches for a given regexp in an input string, instead of just the first match.  This is currently inactive in the irregexp port, and is enabled by the attached patch.  This is a nice improvement for global regexp execution.  If I repeatedly run the /\d+/g regexp times on an 8kb string with a mix of digits and characters then using global mode is 20%-40% faster than repeatedly finding single matches.  Unfortunately though this doesn't really impact benchmark scores.  So maybe it's a good idea to land this (otherwise we should remove the global stuff entirely) but I think this can wait until yarr is entirely gone, which will simplify the code a lot.
You need to log in before you can comment on or make changes to this bug.