telekons / one-more-re-nightmare

A fast regular expression compiler in Common Lisp
https://applied-langua.ge/projects/one-more-re-nightmare/
BSD 2-Clause "Simplified" License
138 stars 9 forks source link

Custom hash consing tables #21

Open no-defun-allowed opened 1 year ago

no-defun-allowed commented 1 year ago

This saves doing lookups when inserting new regular expressions, since we only ever insert and not update (by definition of hash-consing), and the CL hash tables can only upsert. It also provides a custom hash function for tag sets, because the hash function in SBCL behaves poorly and generates very few hashes - about 13 for 50k hashes in one case found by Regrind, leading to terrible performance.