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 NAA00558; Tue, 9 Dec 2003 13:10:12 +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 NAA02001 for ; Tue, 9 Dec 2003 13:10:11 +0100 (MET) Received: from smtp3.pp.htv.fi (smtp3.pp.htv.fi [213.243.153.173]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hB9CAAr20364 for ; Tue, 9 Dec 2003 13:10:11 +0100 (MET) Received: from posti.pp.htv.fi (posti.pp.htv.fi [212.90.64.50]) by smtp3.pp.htv.fi (Postfix) with ESMTP id 28FA427B76C; Tue, 9 Dec 2003 14:10:10 +0200 (EET) Received: from oro (aka.pp.htv.fi [213.243.183.115]) by posti.pp.htv.fi (8.11.1 (Revision 1.5+JAGae91741+JAGae92668) /8.11.1) with ESMTP id hB9CA9T29431; Tue, 9 Dec 2003 14:10:09 +0200 (EET) Received: from naked by oro with local (Exim 3.36 #1 (Debian)) id 1ATggq-0006Us-00; Tue, 09 Dec 2003 14:10:08 +0200 To: "Nicolas Cannasse" Cc: Subject: Re: [Caml-list] Object-oriented access bottleneck References: <871xrhe4hb.fsf@iki.fi> <20031207192702D.garrigue@kurims.kyoto-u.ac.jp> <87brqkcsxf.fsf@iki.fi> <20031208100725E.garrigue@kurims.kyoto-u.ac.jp> <87llpnbb4d.fsf@iki.fi> <20031208154244.GA20491@redhat.com> <006901c3bdeb$252ff510$0274a8c0@PWARP> From: Nuutti Kotivuori Date: Tue, 09 Dec 2003 14:10:07 +0200 In-Reply-To: <006901c3bdeb$252ff510$0274a8c0@PWARP> (Nicolas Cannasse's message of "Tue, 9 Dec 2003 09:26:52 +0900") Message-ID: <878ylmb3a8.fsf@naked.iki.fi> User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Portable Code, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 bottleneck:01 cannasse:01 inlined:01 slower:01 slower:01 generic:01 inlined:01 caml:01 nicolas:01 primitives:01 int:01 bench:02 external:03 unit:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Nicolas Cannasse wrote: > Obj.set_field (Obj.repr (Some 0)) 1000000 (Obj.repr ()) > > But I'm quite surprise that's it's not inlined and slower than > setting a record field (according to the bench results)... and even > slower than calling method (???) The implementation of Obj.set_field is: external set_field : t -> int -> t -> unit = "%obj_set_field" Where %obj_set_field is merely: Parraysetu Pgenarray; from the primitives_table, which is pretty generic. I am not sure why it isn't inlined either. It doesn't get inlined even when having the declaration in the same source file. -- Naked ------------------- 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