[MLton] new TextIO

Stephen Weeks MLton@mlton.org
Thu, 15 Jan 2004 08:18:31 -0800


> What I did was to take the top-level function I didn't want to be inlined
> (say f) and simply add the following top-level code:
> 
>         val _ =
>                if length (CommandLine.arguments ()) > 1000000
>                   then (f some-arg; f some-arg; ...; f some-arg)
>                   else ()
> 
> which should take some code space, and add a single test to the time, but
> have no extra cost.

Makes sense, as long as f is big enough that it doesn't fall under the
always-inline threshold.