AVL trees for Data.Map and Data.Set

Christian Maeder maeder at tzi.de
Wed Mar 1 11:01:17 EST 2006


Adrian Hey wrote:
> What were your keys, btw?

data ShATerm = ShAAppl String [Int] [Int]
              | ShAList [Int]        [Int]
              | ShAInt  Integer      [Int]
                deriving (Eq, Ord)

(where the last list is always empty)

and something (with short strings) like:

   data Id = Id [String] [Id]

and I used Int keys a lot for the comparison (where Data.IntMap is 
always faster).

Cheers Christian


More information about the Libraries mailing list