Just recently felt the need to profile a tiny little Go program that I converted from Perl. Found out just how damn fast Perl's (C-based) regular expressions are. Go's Regexp library is absolutely awesome, but in this specific case significantly slower. Profiling was a piece of cake.
If you've already done the profiling, you're probably already aware of this, but for anybody else: Go uses RE2, not PCRE (which Perl uses, obviously) for regular expressions: https://code.google.com/p/re2/ . There is also a third-party PCRE library for Go somewhere, though the standard library uses RE2. One of the advantages of RE2 is that it guarantees that the regular expression runs in linear time (in the length o…
Incidentally, one of the reasons that PCRE is faster is that it uses a JIT in newer versions.