yea, this still gives me 4 seconds:
module Main where

import System
import System.Time
import qualified Data.Digest.MD5 as MD5
import qualified Data.ByteString as BS

main = do
  args <- getArgs
  dt <- BS.readFile $ head args
  let unpacked = BS.unpack dt
  print $ length $! unpacked
  start <- getClockTime
  print $ MD5.hash $! unpacked
  end <- getClockTime
  print $ diffClockTimes end start

$ ./md5sum ./md5sum
633413
[194,27,77,139,124,90,48,7,141,255,193,164,169,2,128,63]
TimeDiff {tdYear = 0, tdMonth = 0, tdDay = 0, tdHour = 0, tdMin = 0,
tdSec = 4, tdPicosec = 21077000000
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to