Skip to content

How to get the performance of re2 in regex #903

Answered by BurntSushi
freekeeper asked this question in Q&A
Discussion options

You must be logged in to vote
$ cd bench
$ ./run rust sherlock::name_alt | tee rust.log
$ ./run re2 sherlock::name_alt | tee re2.log
$ cargo benchcmp re2.log rust.log                                                              
 name                        re2.log ns/iter       rust.log ns/iter     diff ns/iter   diff %  speedup 
 sherlock::name_alt1         46,296 (12850 MB/s)   35,976 (16536 MB/s)       -10,320  -22.29%   x 1.29 
 sherlock::name_alt2         970,626 (612 MB/s)    85,602 (6949 MB/s)       -885,024  -91.18%  x 11.34 
 sherlock::name_alt3         996,394 (597 MB/s)    96,751 (6149 MB/s)       -899,643  -90.29%  x 10.30 
 sherlock::name_alt3_nocase  1,001,320 (594 MB/s)  377,102 (1577 MB/s)      -624,2…

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@BurntSushi
Comment options

@freekeeper
Comment options

@BurntSushi
Comment options

@freekeeper
Comment options

@BurntSushi
Comment options

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