atomvm / AtomVM

Tiny Erlang VM
https://www.atomvm.net
Apache License 2.0
1.48k stars 105 forks source link

Consider Gimli as general hash function #43

Closed lin7sh closed 5 years ago

lin7sh commented 5 years ago

Hi just found this cool project, good work. One of the dependency is GNU Perfect Hash Function, I'm not sure the use for it, whether its the general hash function used internally for phash/1 or phash2/1, or for other purpose. I have discovered a gimli permutation function used in libhydrogen A good selling point for gimli is that it perform well across all hardware spec, in their reference implementation cortex-M3 and cortex-M4 is included(only depend on libopencm3) Make use of it could shrink the dependency even further

bettio commented 5 years ago

gperf is a build time dependency: it takes a list of strings and it produces as output a C source file. The nifs and bifs hash table is stored in a read only memory area so it doesn't take RAM. In few words gperf is not related to the hashing function exposed to the applications.

lin7sh commented 5 years ago

Thanks for the explanation, I'm closing this now because it's not related to application hashing function