A fast mostly collision free hash ?

Evan Langlois uudruid74 at gmail.com
Wed Nov 9 00:06:24 UTC 2022


My preference for hash function has been xxHash.  It's surprisingly easy to use.  It is not a hash table, but the key distribution the hashing generates is amazing and it's incredibly fast.  Generate the key and use something like a Judy array for the hash table.

⁣Get BlueMail for Android ​

On Nov 8, 2022, 9:43 AM, at 9:43 AM, Jean-Marc Lasgouttes <lasgouttes at lyx.org> wrote:
>Hi everyone,
>
>Currently we use QCache container that remember the size, layout or
>line 
>breaking points of some strings from the document. Basically, a key is 
>mapped to an object.
>
>However currently the key contains the strings, which means that 
>globally all the document is duplicated as cache keys. This is quite a 
>waste.
>
>What would be a good way to replace the string by a good enough
>signature?
>
>* qHash is designed to have some collisions (which are handled by the 
>container); this is not good.
>* boost::crc can be used too, but it is supposed to do something else
>* would using a sha1 or a md5 make sense?
>* I could do fancy things, but I'd rather avoid to import a whole 
>library for this.
>
>I am not looking for something that is strong against malicious
>attacks, 
>but rather something that is fast and works in practice.
>
>Ideas?
>
>JMarc
>-- 
>lyx-devel mailing list
>lyx-devel at lists.lyx.org
>http://lists.lyx.org/mailman/listinfo/lyx-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20221108/70d24865/attachment.html>


More information about the lyx-devel mailing list