grep with --extended-regexp much slower on Ubuntu 16.04
Duane Whitty
duane at nofroth.com
Thu Feb 8 21:28:40 UTC 2018
On 18-02-08 05:03 PM, Karl Auer wrote:
> On Thu, 2018-02-08 at 16:42 +0000, Brian Bird wrote:
>> Eg. On Ubuntu 14.04
>> # openssl rand -out /tmp/random.txt -base64 100000000; time grep --
>> extended-regexp "[0-9]{10}$" /tmp/random.txt
>
> It's possible that the generation of random data is taking longer on
> one than the other. For this sort of test, you want to make sure that
> the test is using the same data on both systems. Pre-generate those
> chunk of random data and use the same chunks on both systems.
>
> Regards, K.
>
The time to generate the data is not the problem as the timer is not
being started until after the file has been created. However, because
the data is random, the work required to do the matching could be
drastically different.
All of the above is assuming that the load is the same on both systems,
which may not be true.
Best Regards,
Duane
--
Duane Whitty
duane at nofroth.com
More information about the ubuntu-users
mailing list