| enlivend ( @ 2008-05-02 11:21:00 |
It's so neat
The Customer wanted to an option to simplify (occasionally) the "run" by dropping one of the tests through which the data has to pass before going on to the next stage. Hmm, I asked, given this is in an innermost loop for almost all the data are you willing to take a mild performance hit so I can check each time around whether to apply this test? We'd rather not, said the Customer.
This innermost test is a hash-table lookup. The solution is so neat:
Thankyou lisp. (Hey, I get paid to do this stuff).
The Customer wanted to an option to simplify (occasionally) the "run" by dropping one of the tests through which the data has to pass before going on to the next stage. Hmm, I asked, given this is in an innermost loop for almost all the data are you willing to take a mild performance hit so I can check each time around whether to apply this test? We'd rather not, said the Customer.
This innermost test is a hash-table lookup. The solution is so neat:
(make-hash-table :test 'true :hash-function (constantly 0))and
setf that (at the beginning of the run, outside all those loops) on top of the real table.Thankyou lisp. (Hey, I get paid to do this stuff).