[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43040: grep 3.4: memory leak
From: |
Shlomi Fish |
Subject: |
bug#43040: grep 3.4: memory leak |
Date: |
Tue, 8 Sep 2020 09:18:11 +0300 |
On Mon, 7 Sep 2020 19:59:09 -0700
Paul Eggert <eggert@cs.ucla.edu> wrote:
> I don't see the extra memory consumption as necessarily being a bug, if grep
> is trading space (which is relatively cheap) for time (which is less so).
> Perhaps someone with some time to spare could look into that in more detail.
>
> The excess CPU consumption is clearly problematic, though. I installed the
> attached patches, which on your example causes 'grep' to be 3x faster than
> grep 3.3 was. I hope this addresses any practical performance problems
> uncovered by that artificial test case. The first patch is a bit of a hack
> but does the real work; the rest are merely cleanups or very minor
> performance improvements.
Thanks, Paul! I can confirm that the latest git master version of gnu grep
(which incorporates the patches) is faster than 3.4.
--
Shlomi Fish https://www.shlomifish.org/
https://youtu.be/n6KAGqjdmsk - “Hurt Me Tomorrow”
And the top story for today: wives live longer than husbands because they are
not married to women.
— Colin Mochrie in Whose Line is it, Anyway?
Please reply to list if it's a mailing list post - https://shlom.in/reply .