summaryrefslogtreecommitdiff
path: root/crc64.c
Commit message (Collapse)AuthorAgeFilesLines
* Portability fixesH. Peter Anvin2007-10-021-0/+1
| | | | | | | | | Concentrate compiler dependencies to compiler.h; make sure compiler.h is included first in every .c file (since some prototypes may depend on the presence of feature request macros.) Actually use the conditional inclusion of various functions (totally broken in previous releases.)
* Use the crc64 we already use as the perfect hash function prehashH. Peter Anvin2007-10-021-4/+2
| | | | | | | 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.
* Switch the preprocessor over to using the hash table libraryH. Peter Anvin2007-09-161-0/+14
| | | | | | | | | | | Switch the preprocessor over to using the hash table library. On my system, this improves the runtime of the output of test/pref/macro.pl from over 600 seconds to 7 seconds. Macros have an odd mix of case-sensitive and case-insensitive behaviour, plus there are matching parameters for arguments, etc. As a result, we use case-insensitive hash tables and use a linked list to store all the possible isomorphs.
* Define a proper hash table libraryH. Peter Anvin2007-09-141-0/+144
Define a proper hash table library, instead of the current ad hoc stuff used for both labels and macros. This only implements the actual library; it is not yet used. We use a CRC64 as a prehash. This is almost certainly overkill, although it is rather efficient (except, arguably, the table lookup) on 64-bit platforms, and not all that bad on 32-bit platforms. All we really need is a function which produces two independent 32-bit results which are used as the primary and secondary hash respectively. Either way, the prehash function is easily replacable if/when we have a quicker alternative.