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 (12:11)
From: David Allsopp <dra-news@m...>
Subject: RE: [Caml-list] ocamlopt performance in 3.11
Alain Frisch wrote:
> 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.

Ah, I didn't realise that. Perhaps ocamlopt -help could include a note to
that effect?

> > 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.

Indeed - that's the benefit I was referring to! However...

> Also, according to a few benchmarks, the impact on performance is very
> limited.

Then why might my program be running ~25% slower when compiled with ocamlopt
3.11.0 vs 3.10.2? I'm assuming that there's little to no difference between
ocamlopt using masm and ocamlopt using gas in terms of resulting