Commit graph

9 commits

Author SHA1 Message Date
Chuck Crayne
757dfad900 Force use of integer values for generating hash keys. 2007-09-02 01:00:34 +00:00
H. Peter Anvin
b938e043ca phash: don't rely on the build platform Perl version of rand()
rand() in Perl can vary between platforms, so don't use it.  Instead,
remove a completely pointless level of indirection (it introduced a
permutation which cancelled itself out) and provide a canned set of
random numbers for the rest.  This guarantees we will always use the
same numbers.
2007-08-31 18:10:23 +00:00
H. Peter Anvin
91a86cdb31 tokhash: Speed up the rejection of unhashed values
Speed up the rejection of unhashed values (typically identifiers) by
filling unused hash slots with a large value (but not so large that
it is likely to overflow.)  This means those values will be rejected
already by the range check, not needing strcmp().
2007-08-31 07:23:31 +00:00
H. Peter Anvin
fb5a599c8a phash.ph: use a bipartite graph to reduce the storage requirements
Since we fold the f- and g-functions together, if we guarantee that g is
bipartite, we can make g twice the size of f without cost.  This greatly
improves the odds of generating a smaller hash.
2007-08-30 23:42:39 +00:00
H. Peter Anvin
74cc5e569c Finishing touches on perfect hash tokenizer; actually turn the thing on
Finish the perfect hash tokenizer, and actually enable it.

Move stdscan() et al to a separate file, since it's not needed in any
of the clients of nasmlib other than nasm itself.

Run make alldeps.
2007-08-30 22:35:34 +00:00
H. Peter Anvin
215c1a3781 phash.ph: more powerful prehashing 2007-08-30 21:39:37 +00:00
H. Peter Anvin
b44d7a76a2 Make the perfect hash generator an includable module 2007-08-30 20:15:25 +00:00
H. Peter Anvin
7a089c0fc7 Add README file 2007-08-29 17:24:03 +00:00
H. Peter Anvin
16a76654b8 Create a Perl library directory, and add the Graph module to it
Graph-0.84 from CPAN
2007-08-29 17:20:09 +00:00