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 TAA02733; Sun, 7 Dec 2003 19:04:33 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA02630 for ; Sun, 7 Dec 2003 19:04:32 +0100 (MET) Received: from smtp2.pp.htv.fi (smtp2.pp.htv.fi [213.243.153.14]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hB7I4V120761 for ; Sun, 7 Dec 2003 19:04:31 +0100 (MET) Received: from posti.pp.htv.fi (posti.pp.htv.fi [212.90.64.50]) by smtp2.pp.htv.fi (Postfix) with ESMTP id 04499297DDC; Sun, 7 Dec 2003 20:04:31 +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 hB7I4UT01495; Sun, 7 Dec 2003 20:04:30 +0200 (EET) Received: from naked by oro with local (Exim 3.36 #1 (Debian)) id 1AT3Gf-0005Zm-00; Sun, 07 Dec 2003 20:04:29 +0200 To: "Nicolas Cannasse" Cc: Subject: Re: [Caml-list] Object-oriented access bottleneck References: <871xrhe4hb.fsf@iki.fi> <002201c3bc6e$195e49e0$0274a8c0@PWARP> From: Nuutti Kotivuori Date: Sun, 07 Dec 2003 20:04:29 +0200 In-Reply-To: <002201c3bc6e$195e49e0$0274a8c0@PWARP> (Nicolas Cannasse's message of "Sun, 7 Dec 2003 11:59:14 +0900") Message-ID: <87vfoscxn6.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 circumvent:01 inlined:01 inlining:01 closures:01 model:01 caml:01 nicolas:01 closure:01 lazy:02 modules:02 objects:02 binding:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Nicolas Cannasse wrote: > [...] >> So - I am asking if I'm correct in my deductions here, or if I >> missed some important point. Or if there's an alternative way to >> circumvent this restriction. >> >> To summarize - is there any way to have some function (or method or >> whatever) that is able to access object member data, without the >> overhead of a lazy binding function call? Preferably ofcourse such >> a function should be eligible to be inlined. >> >> Thanks in advance, >> -- Naked > > There is good way : don't use objects :-) For most of the cases, > modules should be powerful enough and offer far better > performances... and inlining. Even if you need some specialisation, > you can always handle it using a closure. Yes, obviously :-) But when I do happen to need specialisation, I add closures as variables in a record or something - and soon I'll be adding several of them in a single one, then getting bothered that they take up so much space in the object, then come up with having special closure-only records that are shared between different records and... well, as you can see, this only leads to reimplementing the entire object model myself :-) -- 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