![]() have any holes, hide-holes, or names and, in that case, just combining booleans instead of building of mtch structs. This does seem to work on a simple benchmark. The code below gets about 6x faster. But on the r6rs test suite, there is no substantial change (possibly because the caching obviates this optimization?) lang racket/base (require redex/reduction-semantics) (caching-enabled? #f) (define-language L (e (+ e e) number)) (define t (let loop ([n 100]) (cond [(zero? n) 1] [else `(+ 11 ,(loop (- n 1)))]))) (define f (redex-match L e)) (time (for ([x (in-range 1000)]) (f t))) |
||
---|---|---|
.. | ||
examples | ||
private | ||
tests | ||
gui.rkt | ||
info.rkt | ||
main.rkt | ||
pict.rkt | ||
redex.scrbl | ||
reduction-semantics.rkt |