3 ms·
On most context involving "using grep", shell scripts, interactive shell, etc, it's nothing. 81 Vs 128 system calls on my laptop (just printing --version)
by txutxu 4y ago
On most context involving "using grep", shell scripts, interactive shell, etc, it's nothing.
81 Vs 128 system calls on my laptop (just printing --version)
$ strace -fc grep -E --version 2>&1 | tail -1
100.00 0.000000 0 81 3 total
$ strace -fc egrep --version 2>&1 | tail -1
100.00 0.000000 0 128 6 total
Measured with "time" 0m0.002s Vs 0m0.003s, always, testing 4 times each option.
Most situations where it could be being used, probably are surrounded by much bigger optimizations to work on.
- tomn 4y agotrue. using hyperfine on my machine shows that grep is about 2x faster than egrep (and yeah, still nothing, 1.5 vs. 3ms)