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 <[email protected]> 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 >[email protected] >http://lists.lyx.org/mailman/listinfo/lyx-devel
-- lyx-devel mailing list [email protected] http://lists.lyx.org/mailman/listinfo/lyx-devel
