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
ocamlopt performance in 3.11
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-10-20 (08:15)
From: Alain <alainf1978@g...>
Subject: Re: [Caml-list] ocamlopt performance in 3.11
David Allsopp wrote:
> OK, so I've tried using the -nodynlink option with all calls to ocamlopt and
> spotted *no* timing difference. A quick binary comparison of the EXE
> produced reveals that ocamlopt -nodynlink is making ABSOLUTELY NO difference
> in the resulting code.

-nodynlink only makes a difference for the AMD64 backend. It is accepted 
by ocamlopt for all ports in order to simplify Makefiles.

> While I can see a benefit to having native code compile for use with dynlink
> by default, given the performance hit I'm seeing, wouldn't it be better in
> terms of backwards compatibility if you had to specify, say, -fordynlink in
> order to compile a .cmx (and, presumably more importantly, .o file) for use
> with ocamlopt -shared?

There were reasonable arguments for turning the "ready for dynlink" 
behavior on by default, namely that nobody would do it otherwise in the 
Makefiles of their distributed libraries since it is required only on 
one port. Also, according to a few benchmarks, the impact on performance 
is very limited.

-- Alain