As a result of this investigation, we know that using special functions (optimized for certain types of data) is a good idea. I would like to create a hash table, but this source says:
Syntax:
make-hash-table &key test size rehash-size rehash-threshold => hash-table
Arguments and Values:
test - a designator for one of the functions eq, eql, equal, or equalp. The default is eql.
Well, well. What if I wanna speed up my program when I work with strings and use string-equal
for instance? There is no restrictions regarding equality predicates for other high-order functions, but for make-hash-table
they are. What is the reason of that?
Bonus "history-of-lisp" question: why the function gethash
is named so? Why not get-hash
?