philtomson/ClassifyDigits — pull request #2 by chrisdone (2014-06-11 18:05:01+00:00)
Title: A Haskell version

Here is a Haskell version. I more or less translated the F# version
line by line, but used different functions where it made sense for
Haskell.

$ cabal install --dependencies-only
$ time dist/build/ClassifyDigits/ClassifyDigits

I don't know how to get the OCaml or F# ones to compile, so I don't
know how it compares in speed to the others.

With the first version it completes in 21 seconds on my laptop:

$ time dist/build/ClassifyDigits/ClassifyDigits
Start ...
Percentage correct: 94.39999999999999

real 0m21.625s
user 0m21.284s
sys 0m0.316s

I added some commits showing simple updates I did. With the unboxed vectors version it completes in 6 seconds:

$ time dist/build/ClassifyDigits/ClassifyDigits
Start ...
Percentage correct: 94.39999999999999

real 0m6.237s
user 0m6.128s
sys 0m0.084s