4 ms·
I don't think I made a mark against the language itself, or tried to rule it out, or tried to indicate it cannot attain the highest levels of performance - Yes
by platz 13y ago
I don't think I made a mark against the language itself, or tried to rule it out, or tried to indicate it cannot attain the highest levels of performance -
Yes, my point was just that there are programmers using Haskell in a non-optimal way. Beginners seem to be surprised when their Haskell code isn't automatically in the upper level.
I'm not really a great fan of benchmarks, or this particular benchmark, but at least the source of every test is available:
https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/wai/bench/wai.hs https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...
https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/snap/bench/src/Main.hs https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...
https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/yesod/bench/src/yesod.hs https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...
- igouy 13y ago> at least the source of every test is available Also true of the benchmarks game. (Also the command line used to compile and run the program, etc)
- platz 13y agoExcept the code used in the benchmarks game is hardly idiomatic
- igouy 13y agoAccording to who's idea of what is or isn't idiomatic? Yours? Don Stewart's? http://www.willamette.edu/~fruehr/haskell/evolution.html http://www.willamette.edu/~fruehr/haskell/evolution.html Is this "idiomatic": http://benchmarksgame.alioth.debian.org/u64q/program.php?test=meteor&lang=ghc&id=4 http://benchmarksgame.alioth.debian.org/u64q/program.php?tes... "One can, with sufficient effort, essentially write C code in Haskell using various unsafe primitives. We would argue that this is not true to the spirit and goals of Haskell, and we have attempted in this paper to remain within the space of “reasonably idiomatic” Haskell. However, we have made abundant use of strictness annotations, explicit strictness, and unboxed vectors. We have, more controversially perhaps, used unsafe array subscripting in places. Are our choices reasonable?" "Measuring the Haskell Gap" http://www.leafpetersen.com/leaf/publications/ifl2013/haskell-gap.pdf http://www.leafpetersen.com/leaf/publications/ifl2013/haskel...
- platz 13y agoThe meteor example isn't bad at all, no.
- igouy 13y agoIs this idiomatic? http://benchmarksgame.alioth.debian.org/u64q/program.php?test=nbody&lang=ghc&id=2 http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...
- lomnakkus 13y agoNo, that's not idiomatic Haskell code for an application. Foreign.Ptr (and companions) are hardly ever used in normal Haskell code unless you're optimizing for that last bit of performance -- and even then I'd be very hesitant about using it because of the lack of bounds checking, etc. FWIW, I don't Don Stewart[0] would consider that idiomatic either. He just knows a bit more than the rest of us about how to squeeze more performance out of GHC-compiled code and was willing to use non-idiomatic code to do so. Also FWIW, personally I don't think language shootouts are very informative most of the time, but... IMO they should at least use idiomatic code -- otherwise they tell you even less than they already do about what real-life performance is like. [0] Just an example, I know he didn't contribute the particular benchmark you linked to. He did contribute a few of the other programs AFAIK. I think the following sentences also apply to (essentially) all the Haskell shootout contributors.
- igouy 13y ago>I know he didn't contribute the particular benchmark< This otoh: http://benchmarksgame.alioth.debian.org/u64q/program.php?test=nbody&lang=ghc&id=1 http://benchmarksgame.alioth.debian.org/u64q/program.php?tes... >Foreign.Ptr (and companions) are hardly ever used in normal Haskell code unless you're optimizing for that last bit of performance< Do you think "optimizing for that last bit of performance" doesn't happen in the wild? >IMO they should at least use idiomatic code< Provide some! http://benchmarksgame.alioth.debian.org/play.php#contribute http://benchmarksgame.alioth.debian.org/play.php#contribute GHC 7.8.2 installed, cabal 1.2 stuff available as-needed.