Thanks for pointing me at Iavors package. We should not have two different libraries for the same purpose.

value-supply-0.2 is about 6-7 times slower than GHC's UniqSupply, but porting Simons suggestion (to use unsafeDupableInterleaveIO) into Iavors code, GHC is "only" about twice as fast.

Can we do better? I tried to use SPECIALIZE INLINE pragmas (at new[Enum|Num]Supply for Int) and/or strictness annotations (for the unique value) without significant benefit.

I like Iavors more general interface (polymorphic values) and that only demanded identifiers are created. The latter saves half of the names when evaluating

> map supplyValue . split

I will replace my dependency to ghc with one to value-supply if unsafeDupableInterleaveIO is used instead of unsafeInterleaveIO where it is available.

Cheers,
Sebastian
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to