[Haskell-cafe] OCaml list sees abysmal Language Shootout results

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Tue Sep 28 05:55:23 EDT 2004


Keith Wansbrough <Keith.Wansbrough at cl.cam.ac.uk> writes:

>           I can't believe that a simple "wc" implementation should be 
> 570 times slower in Haskell than OCaml - could someone investigate and 
> fix the test?

With code like this, I'm not surprised!

    main = do file <- getContents
              putStrLn $ show (length $ lines file) ++ " " ++
                         show (length $ words file) ++ " " ++
                         show (length file)

Space-leak or what?
Regards,
    Malcolm


More information about the Haskell-Cafe mailing list