[Haskell] performance tuning Data.FiniteMap

Ketil Malde ketil+haskell at ii.uib.no
Tue Feb 24 17:57:37 EST 2004


"S. Alexander Jacobson" <alex at alexjacobson.com> writes:

> However, if my application reads many more times than it writes,
> then perhaps I can get a substantial performance boost by increasing
> the branch factor on the tree.  For example, if each node was an
> array of 256 elements, reads would be O(log256(n)), a 128x
> improvement!

I'm probably missing something, but how can you do this for general
Ord types?  Don't you need a linear search through the array to find
the correct subtree?

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Haskell mailing list