-
Notifications
You must be signed in to change notification settings - Fork 488
Description
As promised in #524, I'm opening this issue because I found a difference in performance between Re2 (with custom bindings) and regex when compiling the regex itself.
Here is the example:
These are the exact bytes that are constructed after parsing Netbeans' old .hgignore and this is the exact way I am using them.
regex takes about 5ms to build the regex while Re2 takes about 1ms on a very stable, 4 core machine.
I cannot offer you an easy reproduction for Re2, however should you want to try to see the difference within Mercurial I can help.
I am using rustc version 1.34.2 and regex version 1.3.5 on a Linux amd64 machine.
Note: I've also seen a small performance difference when using is_match in Mercurial's working directory traversal code, but that is a separate issue probably.