4 ms·
Only that, Ack's core strength over time will always evolve and depend on Perl's regular expression and text processing powers. So re writing this in C will fu
by kamaal 14y ago
Only that, Ack's core strength over time will always evolve and depend on Perl's regular expression and text processing powers.
So re writing this in C will fundamentally mean endlessly growing a language which will look similar to the Perl implementation. Or a Perl DSL.
Not that its a bad thing, I find it interesting though. I would say you better start with a specification.
- AngryParsley 14y agoAg 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.