[Haskell-cafe] Are there major inefficiencies in Haskell compared to OCaml?

2009-12-04 Thread Casey Hawthorne
Are there major inefficiencies in Haskell compared to OCaml?
If so, can something be done about them?
--
Regards,
Casey
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Are there major inefficiencies in Haskell compared to OCaml?

2009-12-04 Thread Don Stewart
caseyh:
 Are there major inefficiencies in Haskell compared to OCaml?
 If so, can something be done about them?

Can you be more specific?

Looking at the u64q shootout:


http://shootout.alioth.debian.org/u64q/benchmark.php?test=alllang=ghclang2=ocamlbox=1

Shows the two implementations tied for memory, and code size, but
Haskell winning the speed tests more often.

-- Don
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Are there major inefficiencies in Haskell compared to OCaml?

2009-12-04 Thread Rick R
On Fri, Dec 4, 2009 at 4:25 PM, Casey Hawthorne cas...@istar.ca wrote:

 Are there major inefficiencies in Haskell compared to OCaml?
 If so, can something be done about them?



There are definitely some gotchas when it comes to performance, mostly in
the realm of inadvertent space leaks and such.
But that's just it, they are gotchas. A new haskeller will no doubt
encounter them, but they are generally simple to fix.

When Haskell and Ocaml are coded by their respective experts, I would, in
general, trust Haskell to be faster.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Are there major inefficiencies in Haskell compared to OCaml?

2009-12-04 Thread Erik de Castro Lopo
Casey Hawthorne wrote:

 Are there major inefficiencies in Haskell compared to OCaml?

As a five plus year veteran of Ocaml and a one year user of Haskell
I would say in general no.

However, Ocaml's strict evaluation makes it easy for someone new to
the language to have a pretty accurate guess about its run time and 
memory usage something which can be difficult in the face of Haskell's
lazy evaluation (not that I have experienced any obvious manifestations
of this myself).

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Are there major inefficiencies in Haskell compared to OCaml?

2009-12-04 Thread M Xyz


However, Ocaml's strict evaluation makes it easy for someone new to
the language to have a pretty accurate guess about its run time and 
memory usage something which can be difficult in the face of Haskell's
lazy evaluation (not that I have experienced any obvious manifestations
of this myself).

Erik

Speaking as someone new to the language, this is one subject that confused me 
while reading RWH. They kept using the phrase space leak and I would think 
Well, I understand that with laziness one simple call could trigger an 
explosion of calculations but how is that a 'leak'?

I had to go back and reread that section before I realized that the laziness 
was implemented as *runtime thunks* and I finally understood why they called it 
a leak. Looking back I think they did a good job explaining it after all, I 
just totally missed it the first time through. 




  ___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe