takikawa / tr-pfds

Typed Racket data structure libraries
58 stars 13 forks source link

Create fast interface to tries for untyped code. #6

Closed samth closed 6 years ago

samth commented 8 years ago

This address the problem pointed out by @jbclements. The following test case runs much much faster:

#lang racket

(require pfds/trie)
(require (prefix-in f: pfds/trie-untyped))

(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)))

(define t* (f:trie (list (rand-list))))
(define u* (time (f:bind (rand-list) 0 t)))
samth commented 8 years ago

Note that this has no documentation yet, and thus isn't quite suitable for merging.

takikawa commented 8 years ago

I'll just merge this and add untyped versions of the others too along with docs. I think I like the convention of doing pfds/foo/untyped for each foo, so I'll restructure it like that.

samth commented 6 years ago

Not as good as #9.