Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: Why OCaml sucks
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Karl Zilles <zilles@1...>
Subject: Re: [Caml-list] Re: Why OCaml sucks
Arthur Chan wrote:
> 
>     Yet, if you look at things in the light of "optimization is
>     depessimization",
>     you'd much rather have easier to read code, than code which is ugly
>     because
>     you preoptimized it by hand. This is why, for me, Ocaml has a long
>     way to go
>     to make it useful for run-of-the-mill production code. My pet peev is
>     performance penalty paid for writing in functional style where it
>     actually
>     makes sense -- say passing an arithmetic operator to a map-style
>     function.
> 
> 
> What do you mean by this?  What language would not incur this kind of 
> performance hit?  Is F# able to optimize this out or were you referring 
> to something else?

For Ocaml: "when inlining higher-order functions with known function 
arguments,  those known function arguments are not themselves inlined."

http://camltest.inria.fr/pub/old_caml_site/caml-list/1048.html

(This is an old post, if things have changed I would love to be corrected.)

sml can inline such functions, making passing + to a map style function 
potentially as efficient as writing a procedural loop.