Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-07 Thread Sebastian Sylvan
On 1/6/06, Udo Stenzel [EMAIL PROTECTED] wrote: Sebastian Sylvan wrote: On 1/5/06, Chris Kuklewicz [EMAIL PROTECTED] wrote: There is no need to beat a dead horse, though. This benchmark sets out to test fgets / atoi, and that is all. There are better benchmarks to spend time on.

Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-06 Thread Chris Kuklewicz
Relative speed comparison below Udo Stenzel wrote: Sebastian Sylvan wrote: On 1/5/06, Chris Kuklewicz [EMAIL PROTECTED] wrote: There is no need to beat a dead horse, though. This benchmark sets out to test fgets / atoi, and that is all. There are better benchmarks to spend time on. I

Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-06 Thread Chris Kuklewicz
Brent Fulgham wrote: --- Chris Kuklewicz [EMAIL PROTECTED] wrote: Also about sum-file: They do not reveal what the actual 8k test file contains. So there is no way to reproduce the benchmark locally for testing. (One can learn it totals 40, but since negative numbers are allowed, this

Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-05 Thread Sebastian Sylvan
On 1/4/06, Brent Fulgham [EMAIL PROTECTED] wrote: --- Sebastian Sylvan [EMAIL PROTECTED] wrote: Some of the problems seem to be heavily geared towards an imperative *implementation*, meaning that a Haskell version is hardly idiomatic Haskell (and as such I , and I suspect otehrs,

Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-05 Thread Chris Kuklewicz
Also about sum-file: They do not reveal what the actual 8k test file contains. So there is no way to reproduce the benchmark locally for testing. (One can learn it totals 40, but since negative numbers are allowed, this does not help much). The problem can even be solved in one line with

Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-05 Thread Sebastian Sylvan
On 1/5/06, Chris Kuklewicz [EMAIL PROTECTED] wrote: Also about sum-file: They do not reveal what the actual 8k test file contains. So there is no way to reproduce the benchmark locally for testing. (One can learn it totals 40, but since negative numbers are allowed, this does not help

Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-05 Thread Chris Kuklewicz
I did manage to tweak SumFile to use unboxed Int# and go 10% faster. http://haskell.org/hawiki/SumFile Sebastian Sylvan wrote: On 1/5/06, Chris Kuklewicz [EMAIL PROTECTED] wrote: Also about sum-file: They do not reveal what the actual 8k test file contains. So there is no way to reproduce

Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-05 Thread Chris Kuklewicz
This uses getLine instead of getContents and is 3.8 times slower. {-# OPTIONS -fglasgow-exts -O2 #-} -- -- The Computer Language Shootout -- http://shootout.alioth.debian.org/ -- -- compile with : ghc -O2 -o SumF SumF.hs -- To get better performance set default heap size to 10MB -- i.e. invoke

Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-04 Thread Brent Fulgham
--- Sebastian Sylvan [EMAIL PROTECTED] wrote: Some of the problems seem to be heavily geared towards an imperative *implementation*, meaning that a Haskell version is hardly idiomatic Haskell (and as such I , and I suspect otehrs, really have no inclination to work on it). I agree that

Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-04 Thread Sebastian Sylvan
On 1/4/06, Brent Fulgham [EMAIL PROTECTED] wrote: But I think Haskell may face real-world cases where data must be produced in some known order. For Haskell to be a contender in real world use, it sometimes has to confront ugly requirements. I must respectfully note that you contradict

Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-04 Thread Brent Fulgham
--- Sebastian Sylvan [EMAIL PROTECTED] wrote: My point here was that even though you _can_ generate this data in Haskell, there's no point in requiring (because the order doesn't matter for the benchmark itself). We do need to agree on which 30 permutations should be used in the validation

RE: [Haskell-cafe] Shootout favoring imperative code

2006-01-04 Thread Scherrer, Chad
--- Sebastian Sylvan [EMAIL PROTECTED] wrote: Some of the problems seem to be heavily geared towards an imperative *implementation*, meaning that a Haskell version is hardly idiomatic Haskell (and as such I , and I suspect otehrs, really have no inclination to work on it). This may be