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
[Caml-list] Object-oriented access bottleneck
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-12-08 (22:28)
From: malc <malc@p...>
Subject: Re: [Caml-list] Object-oriented access bottleneck
On Mon, 8 Dec 2003, Brian Hurt wrote:

> Attached is some microbenchmarking code I just whomped together.  It gives
> both C and Ocaml timings on tight loops of functions calls.  The results:
> My conclusions:
> - Despite my best efforts, ocaml inlined (and removed) the call to foo.
> In general this is good, but it did defeat my efforts to time how long a
> direct function call took.  For some reason it didn't also eliminate the
> for loops.  If I had to guess, Ocaml's call to a known function is about
> the same speed as C's.

Make foo recursive (as in 'let rec foo' vs 'let foo'), OCaml will not
inline it.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: