Version française
Home     About     Download     Resources     Contact us    
Browse thread
Comparison of OCaml and MLton for numerics
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Comparison of OCaml and MLton for numerics
On Fri, Jun 01, 2007 at 06:09:27PM +1000, skaller wrote:
> But still, the algorithm is crude and I found it necessary
> to allow:
> 
> 	fun f ...           // maybe inline
> 	inline fun f 	    // try REALLY HARD to inline
> 	noinline fun f      // never inline

Actually it's more useful to control the inlining of function when
they are applied, rather than when they are defined.  You probably
only want f to be inlined in a few known places, and not inlined the
rest of the time (unless f is extremely trivial).

In more general terms, it was found that turning off inlining in the
Linux kernel reduced the code size by 25%:

  http://lwn.net/Articles/166172/

I bet that actually improved performance too, but unfortunately in the
article above they don't measure that.

Rich.

-- 
Richard Jones
Red Hat