About a 0.5% penalty on speed and bytes allocated. This is with
replacing the internal FastString hashtable with a (Data.Map.Map PtrStr
FastString)
where data PtrStr = PtrStr {-#UNPACK#-}!ForeignPtr {-#UNPACK#-}!Int
with the inefficiency of copying bytes to a ForeignPtr in order to do
the Map-lookup, even if the string is already found in the table.
Not an acceptable replacement for GHC (yet), might be reasonable for
other implementations... which might end up using [Char], not Addr#, for
string literals, as an additional significant change, further into
unexplored territory!
A trie might be more appropriate but they're less available, and
FiniteMap is not very available either due to module import loops
(FiniteMap imports quite a bunch of other GHC stuff!). Any ideas how
any of these could be reasonably usable?
Isaac
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc