diff --git a/routingspeed.rkt b/routingspeed.rkt index 206cb04..8cac21f 100644 --- a/routingspeed.rkt +++ b/routingspeed.rkt @@ -5,15 +5,15 @@ (define N-PATTERNS 10000) (define N-MESSAGES 1000000) -(define (pat n) (pattern->matcher (datum-tset n) (list n ?))) +(define (pat n) (pattern->trie (datum-tset n) (list n ?))) (define pats (time - (for/fold [(p (matcher-empty))] + (for/fold [(p (trie-empty))] [(n (in-range N-PATTERNS))] - (matcher-union p (pat n))))) + (trie-union p (pat n))))) -;; (display (matcher->dot pats)) +;; (display (trie->dot pats)) (collect-garbage) (collect-garbage) @@ -24,7 +24,7 @@ (lambda () (for [(j (in-range N-MESSAGES))] (define i (random N-PATTERNS)) - (matcher-match-value pats (list i i) #f))) + (trie-lookup pats (list i i) #f))) '())) (printf "Delta ~a ms; that is, ~a microsec per routed message, ~a Hz\n"