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 XAA10427; Tue, 2 Apr 2002 23:46:20 +0200 (MET DST) 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 XAA11418 for ; Tue, 2 Apr 2002 23:46:19 +0200 (MET DST) Received: from wetware.wetware.com (wetware.wetware.com [199.108.16.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g32LkHX28618 for ; Tue, 2 Apr 2002 23:46:18 +0200 (MET DST) Received: from kallisti.apple.com(wetware.wetware.com[199.108.16.1]) (1399 bytes) by wetware.wetware.com via sendmail with P:esmtp/R:bind_hosts/T:inet_zone_bind_smtp (sender: ) id for ; Tue, 2 Apr 2002 13:46:16 -0800 (PST) (Smail-3.2.0.114 2001-Aug-6 #1 built 2002-Jan-4) Date: Tue, 2 Apr 2002 13:46:03 -0800 Mime-Version: 1.0 (Apple Message framework v481) Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: [Caml-list] optimum class initializer functions? From: james woodyatt To: The Trade Content-Transfer-Encoding: 7bit Message-Id: <07911903-4683-11D6-A682-000502DB38F5@wetware.com> X-Mailer: Apple Mail (2.481) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk everyone-- I've noticed that using a class where a module would suffice produces substantially larger native code objects. I haven't looked closely enough to know all the details, but it looks like object creation costs about the same as record creation. All the extra space appears to be in the class initializer functions and the static data they require. Seems like a fair trade, but I still have questions. 1) Is there any room for improvement in the space requirements of class implementations generated by the compilers? 2) Are there any idioms to avoid that greatly increase the space requirements of classes without offering any benefit in time or code maintenance? If no ones wants to answer these question, then I suppose I will get around to investigating the issue myself after awhile. -- j h woodyatt ------------------- 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