How expensive are MVars ?
Nick Main
david.nick.main at gmail.com
Thu Jan 13 18:35:43 EST 2005
I'm planning to implement a small OO language on top of GHC (think
JavaScript) and need to decide on how to implement the mutable object
graph that is required.
The two approaches I'm considering are:
- something on top of Data.Graph
- using MVars as the object references.
The MVar approach is the most appealing, since it would also allow the
OO language to contain threads. How expensive is an MVar access (in
GHC), compared to the graph navigation that would be required to
resolve a reference using Data.Graph ?
I know this is a fairly nebulous question, but any comments or
suggestions are appreciated.
--Nick Main
More information about the Glasgow-haskell-users
mailing list