Re: [PATCH] [PoC] A simpler find_unique_prefixes() implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gábor,

On Wed, 28 Aug 2019, SZEDER Gábor wrote:

> Implement find_unique_prefixes() by sorting the prefix items
> lexicographically and then looking for unique prefixes in adjacent
> pairs.  It's definitely shorter than the current hashmap-based
> implementation (101 vs 149 lines), subjectively easier to follow, and
> hopefully less buggy (some of the new elements in the test trigger
> failure with the hashmap).
>
> TODO: deal multi-byte caracter sequences, make the test tool more
>       developer-friendly

Sorry for my late response, I am still trying to catch up with an
ever-growing inbox after trying to pretend to be on vacation.

Your argument is a strong one, and I will try to re-roll, folding the
functionality to find the unique prefixes into `add-interactive.c` while
trying to reuse the already-sorted list for the lookup by prefix.

As to the multi-byte UTF-8 characters: you're right, that code has a
bug. The intention was to require only single-byte characters in the
prefix, for simplicity.

Thanks,
Dscho

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux