4 ms·
On the other hand, Perl is a lot faster. One small test (with a big file) I executed took 1 minute with Perl and 20 minutes with awk. And then there are those
by forinti 7y ago
On the other hand, Perl is a lot faster.
One small test (with a big file) I executed took 1 minute with Perl and 20 minutes with awk.
And then there are those really complicated formats where awk is just not flexible enough.
Awk is really useful, but it doesn't cover the same problem set as Perl does.
- dan-robertson 7y agoI’m a bit surprised by this. It surely depends on the use case. I tend to use awk for the same reasons as the parent (smaller to write and remember) and that the pattern-action structure works really nicely once you get used to it.
- yiyus 7y agoThat depends on what you are doing. Which test did you run? Around 10 years ago I rewrote markdown.pl in awk and it was almost 20 times faster. The speedup came from both a much faster startup time and a much faster (albeit simpler) regexp implementation.
- DmitryOlshansky 7y agoThere are many AWK implementations, OSX I think have subpar AWK. GAWK was fast, last time checked.
- unhammer 7y agowhat script, and which awk?