Being faster then perl is only a bonus.
Hey now. My direct, pure Perl answer was four times faster than the original Perl presented and not even twice as slow as the go; 70% slower on my box.
vr's answer, with a well-known Perl module, is two times faster than the go and kschwab's answer is ten times faster than the go and still shorter by several lines a few dozen chars. Being faster is a matter of tuning and knowing the problem space. With the evidence presented, Perl is the clear speed, space, and cognitive load winner if you know how to match it with the problem.