luser-dr00g / xpost

A PostScript interpreter in C
Other
98 stars 13 forks source link

Increase performance of the hash tables #34

Closed luser-dr00g closed 8 years ago

luser-dr00g commented 8 years ago

The (large) number of calls to xpost_object_compare() by the dictionary functions could be cut considerably by storing the actual hashed key in the table. Table elements would now become triples: (hash, key, value) and the compare function only needs to be called upon the key objects if the hash values compare exactly equal (a cheap 32bit compare).

luser-dr00g commented 8 years ago

Done.