Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2007-06-01 (08:53)
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%:

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


Richard Jones
Red Hat