freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] To use xxhash for comparision of glyphs


From: Werner LEMBERG
Subject: Re: [ft-devel] To use xxhash for comparision of glyphs
Date: Mon, 03 Apr 2017 06:35:39 +0200 (CEST)

> > Note that generation of MD5 is rather slow. Maybe there are
> > quicker algorithms to generate proper hash values to compare,
> > e.g., `murmur hash 3'.
>
> Sir, I found xxhash by google to be a faster hashing algorithm,
> which is even faster (almost twice) than murmur hash 3. Native
> language of the algorithm is in C.
>
>   https://github.com/Cyan4973/xxHash

Thanks for the pointer!  I wasn't aware of this algorithm.

> Running the 32 bit version, xxh32sum will be adequate to avoid
> collisions.

Probably, yes.  However, for the special purpose of PostScript names
for Variation Fonts, I needed a 128bit version due to the extremely
short imput strings, which xxHash currently doesn't provide.  However,
I've found

  https://encode.ru/threads/2556-Improving-xxHash

which describes an even faster method than xxHash, and which comes
with a 128bit version...

Note that I decided to use the simplest 128bit version for PS names,
since speed is no issue.

We are digressing :-)


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]