Marcin 'Qrczak' Kowalczyk wrote:
> ...relative time of IO events that occured in a single thread.
> (>>=) imposes the sequencing.
Yes OK.  I see no problem with required elements of the Unique type to
increase in a single thread.  But I suspect anything stronger than this
could slow things down and/or cause difficulties.
> BTW: The random generator from the IO monad seems to be not
> thread-safe. Oops. I think it should be either fixed or documented.
Haha.  That'll teach them to write global variables into the standard,
won't it?
> That's why I said Integer, not Int :-)
It's important in the application I have in mind (the Two-Flags
problem is a real one in UniForM) that the Unique type be as fast as possible.
So I really do not want it to be tied to any particular thing.  For example
I suggest that for GHC the most efficient implementation might be an
Int64 or a 64-bit pointer (to nothing) on machines which support that, or when not
a Double with incrementing done by the nextAfter function.  Integer is just too
slow.  (You have to allocate two blocks of memory for it I think.)

Reply via email to