4 ms·
Note that grep in particular is extremely optimized.. If you have multi-gigabyte files, and you only search for one thing, shelling out to grep will likely have
by theamk 2y ago
Note that grep in particular is extremely optimized.. If you have multi-gigabyte files, and you only search for one thing, shelling out to grep will likely have much better performance that doing it yourself.
But not every system needs that much, and in a lot of cases, using your language's regexp library will be more robust anf easier to write.