Teoride , uygulamada YMMV'den grepdaha hızlı olması gerektiğine awkkatılırken, kullandığınız uygulamaya çok bağlıdır.
burada, Debby / Linux 7.0 amd64'de (glibc 2.17 ile) 2.5M satırlık bir UTF-8 yerel ayarında meşgul kutusu 1.20.0'ın grep ve awk, GNU grep 2.14, mawk 1.3.3, GNU awk 4.0.1 Yalnızca ASCII karakterleri.
$ time busybox grep error error | wc -l
331003
busybox grep error error 8.31s user 0.12s system 99% cpu 8.450 total
wc -l 0.07s user 0.11s system 2% cpu 8.448 total
$ time busybox awk /error/ error | wc -l
331003
busybox awk /error/ error 2.39s user 0.84s system 98% cpu 3.265 total
wc -l 0.12s user 1.23s system 41% cpu 3.264 total
$ time grep error error | wc -l
331003
grep error error 0.80s user 0.10s system 99% cpu 0.914 total
wc -l 0.00s user 0.11s system 12% cpu 0.913 total
$ time mawk /error/ error | wc -l
330803
mawk /error/ error 0.54s user 0.13s system 91% cpu 0.732 total
wc -l 0.03s user 0.08s system 14% cpu 0.731 total
$ time gawk /error/ error | wc -l
331003
gawk /error/ error 1.37s user 0.12s system 99% cpu 1.494 total
wc -l 0.04s user 0.07s system 7% cpu 1.492 total
$ time
C yerel ayarında, sadece GNU grep önemli bir destek alır ve daha hızlı olur mawk.
Veri kümesinin, normal ifadenin türü de büyük bir fark yaratabilir. Regexps için awkkarşılaştırılması gereken grep -Eşekilde awkbireyin regexpleri genişletilmiş RE bulunmaktadır.
Bu veri kümesi için, varsayılan ve varsayılan yerel ayar UTF-8 tabanlı (IIRC, Ubuntu'da olduğu gibi) meşgul kutusu tabanlı sistemlerden veya sistemlerden awkdaha hızlı olabilir .grepmawkawk
timeçalıştırılmasının ne kadar süreceğini belirleyen komutla kabuk komut dosyalarında bile herhangi bir komuttan önce. Ör:time ls -l.