Data Structures in Clojure: Hash Tables
macromancy.com
Data Structures in Clojure: Hash Tables
1–10 of 13 posts
Re: Data Structures in Clojure: Hash Tables
#2That makes it sound like type hints are essentially mandatory for anything where performance matters.
Nice article! It would have been interesting to see how it fares against something like java.util.HashMap.
Re: Data Structures in Clojure: Hash Tables
#3> On the machine this was implemented, insertion speed increased ~110x, compared with the non-hinted implementation. That makes it sound like type hints are essentially mandatory for anything where performance matters. Nice article! It would have been interesting to see how it fares against something like java.util.HashMap.
Re: Data Structures in Clojure: Hash Tables
#4> On the machine this was implemented, insertion speed increased ~110x, compared with the non-hinted implementation. That makes it sound like type hints are essentially mandatory for anything where performance matters. Nice article! It would have been interesting to see how it fares against something like java.util.HashMap.
Yeah, the less runtime reflection you make it use, the better the speed gains (I'm glad type hints are optional though).
Re: Data Structures in Clojure: Hash Tables
#5Additionally, I don't know Closure, but are there any default hash-table implementations? If so, how does this implementation compare against the base one?
Re: Data Structures in Clojure: Hash Tables
#6Re: Data Structures in Clojure: Hash Tables
#7> On the machine this was implemented, insertion speed increased ~110x, compared with the non-hinted implementation. That makes it sound like type hints are essentially mandatory for anything where performance matters. Nice article! It would have been interesting to see how it fares against something like java.util.HashMap.
Re: Data Structures in Clojure: Hash Tables
#8> On the machine this was implemented, insertion speed increased ~110x, compared with the non-hinted implementation. That makes it sound like type hints are essentially mandatory for anything where performance matters. Nice article! It would have been interesting to see how it fares against something like java.util.HashMap.
Re: Data Structures in Clojure: Hash Tables
#9Where is the definition of the actual hash function? That is the interesting and tricky part of a hash table. Is "hash" a Clojure built-in?
Re: Data Structures in Clojure: Hash Tables
#10Very nitpicky but I find the ligatures on all the "t" characters very distracting. Additionally, I don't know Closure, but are there any default hash-table implementations? If so, how does this implementation compare against the base one?
Clojure provides Persistent Hash Tries (look them up) as well as several other immutable map implementations. Mutable maps are provided by the Java base class libraries.