2 ms·
Ag supports the same regexes as Ack. I use the PCRE library. I only call pcre_study once, and I use the new PCRE-JIT[1] on systems where it's available. These t
by AngryParsley 14y ago
Ag supports the same regexes as Ack. I use the PCRE library. I only call pcre_study once, and I use the new PCRE-JIT[1] on systems where it's available. These tweaks add up to a 3-5x speedup over Ack when regex-matching.
1. http://sljit.sourceforge.net/pcre.html http://sljit.sourceforge.net/pcre.html
- btilly 14y agoIf you use PCRE, you do NOT support the same regexes as Ack. "Perl Compatible" isn't really Perl compatible, see http://en.wikipedia.org/wiki/PCRE http://en.wikipedia.org/wiki/PCRE for details.
- AngryParsley 14y agoYes, there are a few edge cases, but hardly anyone uses those features. In fact, 90% of the time, most people seem to use literal string matching.