From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA05153; Mon, 8 Dec 2003 23:28:35 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA05475 for ; Mon, 8 Dec 2003 23:28:32 +0100 (MET) Received: from comtv.ru (comtv.ru [217.10.32.42]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hB8MSVr11450 for ; Mon, 8 Dec 2003 23:28:32 +0100 (MET) Received: from av1474.oops ([10.0.66.9] verified) by comtv.ru (CommuniGate Pro SMTP 4.1.8) with ESMTP id 17295894; Tue, 09 Dec 2003 01:28:29 +0300 Date: Tue, 9 Dec 2003 01:30:08 +0300 (MSK) From: malc X-X-Sender: malc@home.oyster.ru To: Brian Hurt cc: Ocaml Mailing List Subject: Re: [Caml-list] Object-oriented access bottleneck In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: caml-list@inria.fr X-Spam: no; 0.00; malc:01 malc:01 pulsesoft:01 caml-list:01 bottleneck:01 timings:01 inlined:01 foo:01 ocaml's:01 c's:01 foo:01 'let:01 foo':01 'let:01 foo':01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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. -- mailto:malc@pulsesoft.com ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners