by trymas · 11y ago · 0 comments
I've read a bit about ag, which is rather fast compared to anything in the wild, and it seems that it utilises all tools to make it as fast as possible. Though, sift can be up to 8 times as fast. How?
EDIT: also I remember, that the last time it was posted here (or either /r/programming), the benchmark was considered not true. Few checks on few folders (from big to small) renders sift slower than ag from 5 to 20 times (though probably faster than grep and/or ack).
EDIT2: https://github.com/svent/sift/issues/7 - about benchmarks. Maybe numbers are true, but they are done in rather specific conditions, with specific cases, where sift can be possibly faster. But in general development it will be rather slow.
$ export LC_ALL=C; grep ...
The regular grep works on Unicode, which can be 10 times slow. Sift works on plain bytes. Also sift benchmark is somewhat inflated. Test on your own data.