[Haskell-cafe] Re: GHC predictability
Richard A. O'Keefe
ok at cs.otago.ac.nz
Wed May 14 01:35:16 EDT 2008
On 14 May 2008, at 8:58 am, Andrew Coppin wrote:
> What I'm trying to say [and saying very badly] is that Haskell is an
> almost terrifyingly subtle language.
Name me a useful programming language that isn't.
Simply interchanging two for-loops, from
for (i = 0; i < N; i++) for (j = 0; j < N; j++)
to for (j = 0; j < N; j++) for (i = 0; i < N; i++)
when marching over an array, can easily slow you down
by nearly two orders of magnitude in C.
[Hint: read "What every computer scientist needs to know
about memory".] For a real shock, take a look at what
your C++ templates are doing...
There's one big difference between Haskell and language T (my other
preferred language). Seemingly insignificant changes in Haskell can
kill performance, but seemingly insignificant changes in language T
can take you into territory the library designers never thought of
where there are lions, tigers, and bears in abundance. "Unexpectedly
slow" is better than "inexplicably buggy".
More information about the Haskell-Cafe