2 ms·
yes! also when you only have two or three things in them, they are faster than hashing, especially on machines without a data cache. clojure uses hamts for th
by kragen 2y ago
yes! also when you only have two or three things in them, they are faster than hashing, especially on machines without a data cache. clojure uses hamts for this, thus getting this fp-persistence† as well as efficient lookup in large dictionaries, and chris wellons posted a concise, fast c hamt implementation last year at https://nullprogram.com/blog/2023/09/30/ https://nullprogram.com/blog/2023/09/30/
______
† 'persistent' unfortunately also means 'stored in nonvolatile memory', so i feel the need to disambiguate