[Haskell-cafe] sha1 implementation thats "only" 12 times slower
then C
Anatoly Yakovenko
aeyakovenko at gmail.com
Sun Jul 1 14:07:42 EDT 2007
so using mseq didn't seem to make any difference, i still had the same
performance.
On 7/1/07, Benja Fallenstein <benja.fallenstein at gmail.com> wrote:
> Hi,
>
> 2007/7/1, Bulat Ziganshin <bulat.ziganshin at gmail.com>:
> > aa <- unsafeRead a5 0
> > return $! aa
> > bb <- unsafeRead a5 1
> > return $! bb
>
> If this is a useful pattern, would it make sense to have a function to
> encapsulate it?
>
> mseq :: Monad m => m a -> m a
> mseq m = m >>= (return $!)
>
> - Benja
>
More information about the Haskell-Cafe
mailing list