Bug
Stephen Weeks
MLton@sourcelight.com
Thu, 14 Jun 2001 17:19:02 -0700
I'd recommend using LargeInt, in the hope of being portable.
val bs = LargeInt.div (LargeInt.fromInt (BLOCK_LEN * BLOCK_COUNT),
Time.toSeconds time)
val msg = String.concat ["digest: ",MD5.toHexString digest,
"\n", LargeInt.toString bs,
" bytes/second\n"]
> Here are some performance numbers for MLton on md5.sml. Quite, impressive.
>
> Computing 100000 rounds on a 1000 byte block.
> 500 mhz Celeron with 128kb cache
>
> 33333333 bytes/second (reference C version gcc -O2)
> 33333333 bytes/second (reference C version gcc -O4)
>
> 14285714 bytes/second (mlton safe = true)
> 16666666 bytes/second (mlton safe = false)
>
> 1470588 bytes/second (sml 110.33)
> 609756 bytes/second (sml 110.0.7)
Cool. Here are some numbers on my machine, with 5 different versions of MLton.
MLton version M/s
--------- ----
20000906 C 16.7
20010125 C 7.7
20010125 native 12.5
working C 7.7
working native 11.1
So, we've managed to slow things down a bit, probably due to more pessimistic
register allocation assumptions in the presence of threads. Hopefully we'll fix
that at some point.