summaryrefslogtreecommitdiff
path: root/perllib
Commit message (Collapse)AuthorAgeFilesLines
* phash.ph: we haven't required the Graph module for a long timeH. Peter Anvin2010-02-181-2/+0
| | | | | | | We removed the need for the Graph module back at checkin c593173e110244f99a3498cb3e23d6c3c07bae35 in 2008. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* phash: canonicalize order, fix handling of ignored duplicatesH. Peter Anvin2008-05-251-1/+4
| | | | | | | | | Canonicalize the order of the prehash entries, so we don't have to worry about looking up both pairs of edges. When we find a collision that we decide to ignore, there is no point in adding the same edge into the array again; instead, just skip the current edge.
* phash: allow collisions if the hash target is the sameH. Peter Anvin2008-05-251-1/+1
| | | | | | | If the hash target is the same value, we can permit collisions. This isn't relevant for the current applications of the hash generator, but is useful for cases where one have a number of sources for the same target. It's easy to check, either way.
* phash: massively speed up the perfect hash generatorH. Peter Anvin2008-05-2523-10963/+50
| | | | | | Make the perfect hash generator about 200x faster by using a very simple custom graph adjacency representation instead of using Graph::Undirected.
* phash: cut random vector set down a bitH. Peter Anvin2008-05-202-195/+3
| | | | Reduce the size of the random vector set somewhat
* Use the crc64 we already use as the perfect hash function prehashH. Peter Anvin2007-10-024-156/+442
| | | | | | | Use the same crc64 that we already use for the symbol table hash as the perfect hash function prehash. We appear to get radically faster convergence this way, and the crc64 is probably *faster*, since the table likely to be resident in memory.
* Change the token prehash function for better convergenceH. Peter Anvin2007-09-181-2/+2
| | | | | | | Combining arithmetric (add) and bitwise (xor) mixing seems to give better result than either. With the new prehash function, we find a valid hash much quicker.
* phash: Tell the user when the graph is OKH. Peter Anvin2007-09-121-2/+2
| | | | | Tell the user when the graph is OK, so that we don't get quite so much of "a list of errors followed by a long pause."
* phash: Be a bit more aggressive about trying to make a small hashH. Peter Anvin2007-09-121-1/+1
| | | | Change the threshold to 0.7 instead of 0.8.
* phash.ph: yet another attempt at getting Perl to behave, arithmeticallyH. Peter Anvin2007-09-021-7/+15
|
* phash.ph: remove some stale codeH. Peter Anvin2007-09-021-9/+0
| | | | Remove old randomization code which is no longer used.
* Force use of integer values for generating hash keys.Chuck Crayne2007-09-021-2/+4
|
* phash: don't rely on the build platform Perl version of rand()H. Peter Anvin2007-08-313-58/+168
| | | | | | | | 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.
* tokhash: Speed up the rejection of unhashed valuesH. Peter Anvin2007-08-311-3/+9
| | | | | | | 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().
* phash.ph: use a bipartite graph to reduce the storage requirementsH. Peter Anvin2007-08-301-13/+19
| | | | | | 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.
* Finishing touches on perfect hash tokenizer; actually turn the thing onH. Peter Anvin2007-08-301-2/+4
| | | | | | | | | 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.
* phash.ph: more powerful prehashingH. Peter Anvin2007-08-301-14/+20
|
* Make the perfect hash generator an includable moduleH. Peter Anvin2007-08-301-0/+260
|
* Add README fileH. Peter Anvin2007-08-291-0/+5
|
* Create a Perl library directory, and add the Graph module to itH. Peter Anvin2007-08-2922-0/+10912
Graph-0.84 from CPAN