4 ms·
Rafe Colburn from Etsy wrote about this performance oddity: http://rc3.org/2014/08/28/surprisingly-perl-outperforms-sed-and-awk/ http://rc3.org/2014/08/28/surpr
by ronjouch 12y ago
Rafe Colburn from Etsy wrote about this performance oddity:
http://rc3.org/2014/08/28/surprisingly-perl-outperforms-sed-and-awk/ http://rc3.org/2014/08/28/surprisingly-perl-outperforms-sed-...
EDIT to manage expectations: the article doesn't explain why, it just provides benchmarks and one commenter made a suggestion about character handling. More insight still welcome :)
- sbi 12y agoThere are many different versions of awk: gawk, (BSD) nawk, mawk, etc. I think OS X uses nawk, but mawk is reputedly faster. Gawk is definitely slower than both mawk. I'm not surprised that Perl is faster though.
- Tobu 12y ago> I used the default OS X versions of these tools. The versions were Perl 5.16.2, Awk 20070501, and some version of BSD sed from 2005