Function Memoization and Commutative Hash Function
While trying to improve speed of a function which receives millions of
repetitive identical calls I realized that memoization is quite
promising for my situation. Furthermore, instead of issuing a (make-
hash-table :test #'equal) and using (gethash (cons arg0 arg1) cache),
I thought using a hash function for arg0/1 couple would perform better
than an EQUAL comparison. And after some more CPU cycles, I realized
that I can use a vector instead of the hash-table while I have unique
integer hash signatures produced for each input. And suprisingly
switching from hash-table to vector, reduc...Modules for hash functions? (ie, common algorithms for computing hash keys, not manipulating perl hashes)
Are there any modules out there for common string hashing algorithms?
I've got a project where I'm going to be setting up a database of
texts, potentially large, amongst which we'll need to be able to
identify duplicate texts quickly.
> Are there any modules out there for common string hashing algorithms?
> I've got a project where I'm going to be setting up a database of
> texts, potentially large, amongst which we'll need to be able to
> identify duplicate texts quickly.
...User-defined equality/hashing functions in hash tables?
What implementations support user-defined equality/hashing functions
for built-in hash tables? Here are the ones I know of:
Allegro - :hash-function argument to MAKE-HASH-TABLE
CMUCL - DEFINE-HASH-TABLE-TEST function in EXT package
SBCL - DEFINE-HASH-TABLE-TEST function in SB-INT package
CLISP - DEFINE-HASH-TABLE-TEST macro in EXT package
Peter Seibel email@example.com
Lisp is the red pill. -- John Fraser, comp.lang.lisp
Peter Seibel <firstname.lastname@example.org> writes:
> any others?
HiI want to create word dictionary by hash algorithm. But I don't knowwhat is the best hash function for this and then how to implement hashtable in java.please help methanks On Wed, 04 Jul 2007 20:57:41 -0000, ahd292 <email@example.com>
wrote, quoted or indirectly quoted someone who said :
>I want to create word dictionary by hash algorithm. But I don't know
>what is the best hash function for this and then how to implement hash
>table in java.
Do people often use hash() on built-in types? What do you find it useful
How about on custom classes? Can anyone give me some good tips or hints
for writing and using hash functions in Python?
Steven D'Aprano <steve@REMOVETHIScyber.com.au> writes:
> Do people often use hash() on built-in types?
> What do you find it useful for?
> How about on custom classes?
> Can anyone give me some good tips or hints for writing and using
> hash functions in Python?
Well, the usual tip for writing ...How to hash a function?
I'm using the latest PltScheme.
I thought I'd play with a Forth'ish idea - and wanted to create a hash
table of functions. So what I've got so far is:
(require (lib "setf.ss" "swindle"))
(define stack '())
(define dict (make-hash-table))
(lambda (k v)
(define (add-word str sym)
(hash-table-put! dict str sym))
(define (push n) (push! n stack))
(define (pop) (pop! stack))
(define (/read) (push (read...hashing function
I'm working with some large (several hundred megs) flat database files. I
need to examine the records for duplicates. Obviously, I don't want to
store several hundred megs of data in a hash. What I'd like to do is to
read each record, generate a hash value for the record, store that hash
value and an index key rather than storing the entire record, and look for
collisions in the hash value.
Perl obviously uses an internal hashing function to create it's hash
variables. Is it possible to access this function or to get the actual
hash value it produces? If not, any pointe...Hashing Function
I'm wondering what hashing function Python uses for
Thanks for your help.
Yahoo! Mail - PC Magazine Editors' Choice 2005
Can someone direct me to fortran source code for popular or effective
hashing functions, such as sha1 or md5? This turns out to be hard to
search for, because of all the messages mentioning various hashes in
headers or sigs.
> Can someone direct me to fortran source code for popular or effective
> hashing functions, such as sha1 or md5? This turns out to be hard to
> search for, because of all the messages mentioning various hashes in
> headers or sigs.
Brent's hashing algorithm is implemented in Fortran 90 at