Sorry for the slow reply,
On 3/8/06, Einar Karttunen <ekarttun@cs.helsinki.fi> wrote:
Does anyone have an efficient tree implemented in STM that
supports concurrent updates in an efficient fashion? This
seems suprisingly hard to implement - a normal binary
tree with links as TVar is very slow and does not scale
very well.
I'm just wondering whether it is important for you that all the internal links are TVars. That of course depends on what kind of API you're imagining for your data structure. I would imagine though that a single TVar pointing to the root of your favourite functional tree implementation will be quite sufficient. My guess is it would also be the fastest way of implementing it.
Cheers,
/Josef