This program constructs a trie containing exactly two keys; each is a list of 256 integers. On my machine, it takes *twelve seconds*. The time taken appears to be n^2 in the length of the key, so doubling it to 256 means it’ll take about a minute to add a key.
#lang racket (require pfds/trie) (define (rand-list) (for/list ([i (in-range 128)]) (random 256))) (define t (trie (list (rand-list)))) (define u (time (bind (rand-list) 0 t))) When I translate this to typed racket, the time taken is 0 ms. I feel like I got a bit burned here, and an ordinary user might simply conclude that Racket libraries are teh suck. Can we add a warning to the beginning of the documentation page for Tries (and perhaps for the other data structures as well) indicating that these functions are likely to be unusably slow in #lang racket? I propose the following, at the top of the documentation. Possibly in boldface. “NB: these data structures are written in Typed Racket. While they may be nominally usable in the (untyped) Racket language, the resulting dynamic checks will probably cause them to be unacceptably slow” Suggestions? May I make a pull request here? John -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.