[Haskell-cafe] Looking for an efficient tree in STM
ekarttun at cs.helsinki.fi
Wed Mar 8 08:23:50 EST 2006
On 08.03 13:32, Tomasz Zielonka wrote:
> > This seems suprisingly hard to implement - a normal binary tree with
> > links as TVar is very slow and does not scale very well.
> By "normal" you mean unbalanced? Do you think it's slow because it's not
> balanced, or because of STM?
Unbalanced in this case because balancing produces even more problematic
effects (TVar writes). I used random inserts in the test which kept the tree in
a good balance, and tested the same tree without STM to see whether that
was the problem - so I am fairly sure that balancing is not the issue.
- Einar Karttunen
More information about the Haskell-Cafe