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 LAA05017; Tue, 11 Jun 2002 11:01:26 +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 LAA05029 for ; Tue, 11 Jun 2002 11:01:25 +0200 (MET DST) Received: from cirse.saclay.cea.fr (cirse.saclay.cea.fr [132.166.192.127]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g5B91L127585; Tue, 11 Jun 2002 11:01:21 +0200 (MET DST) Received: from argiope.saclay.cea.fr (argiope.saclay.cea.fr [132.166.192.108]) by cirse.saclay.cea.fr (8.12.2/8.12.2/CEAnet-Internet.1.0) with ESMTP id g5B92iPl007583; Tue, 11 Jun 2002 11:02:44 +0200 (MEST) Received: from muguet.saclay.cea.fr (unverified) by argiope.saclay.cea.fr (Content Technologies SMTPRS 4.2.10) with ESMTP id ; Tue, 11 Jun 2002 10:55:28 +0200 Received: from is002254.saclay.cea.fr (is002254.saclay.cea.fr [132.166.134.67]) by muguet.saclay.cea.fr (8.12.2/8.12.2/CEAnet-Interne.1.0) with ESMTP id g5B91PCf002388; Tue, 11 Jun 2002 11:01:25 +0200 (MEST) Received: from basile by is002254.saclay.cea.fr with local (Exim 3.35 #1 (Debian)) id 17HhW5-00026t-00; Tue, 11 Jun 2002 11:00:41 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <15621.48184.612059.440907@is002254.saclay.cea.fr> Date: Tue, 11 Jun 2002 11:00:40 +0200 To: Animesh Pathak CC: caml-list@inria.fr Subject: [Caml-list] mutable Vs non mutable In-Reply-To: <200206110850.g5B8o8L02883@payia.inria.fr> References: <200206110850.g5B8o8L02883@payia.inria.fr> X-Mailer: VM 7.03 under Emacs 21.2.1 From: Basile STARYNKEVITCH Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >>>>> "Animesh" == Animesh Pathak writes: Animesh> What are the costs incurred (if any) in terms of program Animesh> size/speed if we use mutable variables in place of a non- Animesh> mutable one?? Only fields are mutable. When a mutable field is overwritten, the garbage collector's write barrier is exercised. This has some costs, first inside the write barrier's code, and eventually inside the GC itself. I've got no idea about the quantitative costs. But I am not worried of using mutable fields (eg references) in my code when needed. (I first try to find the right algorithms. Optimization is usually useless....) Regards N.B. Any opinions expressed here are only mine, and not of my organization. N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA. --------------------------------------------------------------------- Basile STARYNKEVITCH ---- Commissariat à l Energie Atomique * France DRT/LIST/DTSI/SLA * CEA/Saclay b.528 (p111f) * 91191 GIF/YVETTE CEDEX phone:+33 1,6908.6055; fax: 1,6908.8395 home: 1,4665.4553; mobile: 6,8501.2359 work email: Basile point Starynkevitch at cea point fr home email: Basile at Starynkevitch point net ------------------- 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