Re: [PATCH 5/9] xdiff: split xrecord_t.ha into line_hash and minimal_perfect_hash
- From
Chris Torek <chris.torek@gmail.com>
- Date
- Oct 21, 2025, 11:16 UTC
- Message-ID
- <CAPx1Gvdd4KW=P=0te6ZeBXJPSp8NgyXnrEnJLb5g1uLcjNYnXQ@mail.gmail.com>
- In-Reply-To
- <a0711cfe-6e44-44d6-b66b-84a296e113d2@gmail.com>
On Tue, Oct 21, 2025 at 3:04 AM Phillip Wood <phillip.wood123@gmail.com> wrote: ...
> uint64_t. How much more memory do we end up using by adding second hash > member to the struct?
As in any string-to-string algorithm of this sort, there's one per "symbol", but in this case a "symbol" is a line in a file. So if files are M and N lines long, there are M+N symbols. Take the difference of the size of the two records and multiply by this.
Assuming "sane" input file sizes (under a million lines each) it's a few megabytes maximum...
Chris