Skip to content

PCRE2 mode rg -P is consistently faster than rg #2763

Discussion options

You must be logged in to vote

On my i9-12900K, there's no meaningful regression in ripgrep's default regex engine for this benchmark:

$ time static-rg-14.1.0 '^\w{42}$' subtitles2016-sample
21225780:EverymajordevelopmentinthehistoryofAmerica

real    1.205
user    1.165
sys     0.040
maxmem  933 MB
faults  0

$ time static-rg-13.0.0 '^\w{42}$' subtitles2016-sample
21225780:EverymajordevelopmentinthehistoryofAmerica

real    1.220
user    1.179
sys     0.040
maxmem  944 MB
faults  0

$ time static-rg-11.0.2 '^\w{42}$' subtitles2016-sample
21225780:EverymajordevelopmentinthehistoryofAmerica

real    1.229
user    1.195
sys     0.033
maxmem  941 MB
faults  0

PCRE2 has actually gotten a little faster (and is indeed faste…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@LeoniePhiline
Comment options

@BurntSushi
Comment options

@LeoniePhiline
Comment options

Answer selected by LeoniePhiline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants