tokhash: Speed up the rejection of unhashed values
authorH. Peter Anvin <hpa@zytor.com>
Fri, 31 Aug 2007 07:23:31 +0000 (07:23 +0000)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 31 Aug 2007 07:23:31 +0000 (07:23 +0000)
commit91a86cdb31f8f68f6cebd42ac6dae202adc3f8fe
treecc8137c24bb00dca67c1ec0978ec52e5340e1086
parent535af831f15a2a89e726d0c9a38103005b3bce27
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().
perllib/phash.ph
tokhash.pl