Re: [PATCH 0/4] Add resize_hash() to hash.c
"Kevin J. McCarthy" <[email protected]> Fri, 24 Jul 2026 14:10:59 +0800
| Newsgroups | gmane.mail.mutt.devel |
|---|---|
| Message-ID | <[email protected]> |
--oAf4NrCK9jIyzlfk Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 20, 2026 at 01:00:36PM +0800, Kevin J. McCarthy wrote: >The first patch is just a couple formatting fixes. > >The second patch renames "nelem" to "bucket_count" to hopefully reduce >ambiguity. > >The third patch adds a "elem_count" and increments/decrements it on >hash insert/remove. > >The last patch is the main one, adding resize_hash(). I am not a hash >expert. If you have suggestions on the resizing limit, currently: > if (table->elem_count > table->bucket_count * 1.2) > resize_hash(table); >or other issues, please don't hesitate to mention them. I've pushed this up to master. --=20 Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA --oAf4NrCK9jIyzlfk Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmpjAfIACgkQre92hIAx a9pHshAAwyaGRFurB+m4rUw/Cc29dKghzvSCsysO+8DEdIG0I4PYuywBecuerBfI 4XnTY/eOHYxOL+W/4lc12JH8lkxtw6V0iTjYnAUTweEdYY8zvSFWog9x4IWpXOmG 2yJ4sHzKK7CFjxxnaL9wOZYW9onNV7tR23usDqtvzdUvWNC8DLgu1KhsgUJBGzoW P6AudllqQv1pk+jiBXw7zNDyqky5ciGac4zAtNo4nFSW1CmauJMOUrS6ASeaqHH7 zFOGfCZ8dIFm4l1sMxs5+Z1tVuiG/OBtLfXhsp+qvly+UxWCLRuNMyHDSpgNqIJO ikHkk0yydcRKzKd7qfbIjai7ix0Wc74RrdDS51CmfLrlDOP4aXuqlsCSJmZEofGo pfgIY3CFlklUf/o1vdfXT3Yr54jLTYeT/FJrzRifrxrfEy0ooidgnpJOuLvqSQ9k 7ti4UbVDW5PujWC7FqFSouBDvRvpAcyqGqtxRLf9rEDB1Y3gsgsFSXYe+aOH5d3L asnjudVjEN8ZU/pGcoY+KvMQJiYFjA5JzJNAaoMC0jvuwOgNr41Fy40qfvhQaMQO HsbEvL4AfgzN5l1VvF1O/IjW/gadXBpbwklqEdhE7+11ilmaI6fv/iTrnP0XMCe6 ASRLkCd70RrSvtfFRuWEnuFKt8M9SUSlDPD3GP/AmLatlk/6bTA= =lAPa -----END PGP SIGNATURE----- --oAf4NrCK9jIyzlfk--