Live data from Hacker News

Profiling Go Programs

slideshare.net

11–14 of 14 posts

Re: Profiling Go Programs

#11
post #5

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…

Perl doesn't actually use PCRE by default, though it's an option in 5.10.

Incidentally, one of the reasons that PCRE is faster is that it uses a JIT in newer versions.

Re: Profiling Go Programs

#13

Does anyone have a link to download the slides? Slideshare apparently doesn't believe people can exist without either a Facebook or LinkedIn account or both.

Looks like you can sign up just fine with only an email address.
Post reply on HN