From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 3A91DBC6B for ; Sun, 9 Dec 2007 23:16:36 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAHf3W0fAbSoIh2dsb2JhbACPYwIBCAop X-IronPort-AV: E=Sophos;i="4.23,274,1194217200"; d="scan'208";a="5453701" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail1-smtp-roc.national.inria.fr with ESMTP; 09 Dec 2007 23:16:32 +0100 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: Received: from einhorn.in-berlin.de (localhost [127.0.0.1]) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id lB9MGVai021234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 9 Dec 2007 23:16:31 +0100 Received: (from www-data@localhost) by einhorn.in-berlin.de (8.13.6/8.13.6/Submit) id lB9MGVsm021232 for caml-list@yquem.inria.fr; Sun, 9 Dec 2007 23:16:31 +0100 X-Authentication-Warning: einhorn.in-berlin.de: www-data set sender to oliver@first.in-berlin.de using -f Received: from dslb-088-073-089-167.pools.arcor-ip.net (dslb-088-073-089-167.pools.arcor-ip.net [88.73.89.167]) by webmail.in-berlin.de (IMP) with HTTP for ; Sun, 9 Dec 2007 23:16:31 +0100 Message-ID: <1197238591.475c693f5fb58@webmail.in-berlin.de> Date: Sun, 9 Dec 2007 23:16:31 +0100 From: Oliver Bandel To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ask for a more efficient way to deallocate memory (full version) References: <39980.81.57.198.61.1197236388.squirrel@webmail.lpn.cnrs.fr> In-Reply-To: <39980.81.57.198.61.1197236388.squirrel@webmail.lpn.cnrs.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.6 X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 X-Spam: no; 0.00; bandel:01 in-berlin:01 ocaml:01 ocaml's:01 ocaml:01 iterators:01 iterators:01 oliver:01 oliver:01 caml-list:01 data:02 data:02 python:03 python:03 deallocate:03 Zitat von Fabrice.Pardo@lpn.cnrs.fr: [...] > > My question is how to write a code as efficient > as it would be possible using a reference-counted language. [...] I don't now, from which languages you come, but possibly Python or Perl. In a discussion on using data-structures (e.g. lists) compared to do it "with iterators", I talked witha Python-programmer. He insisted to use iterators, because that's so much more effifient. Yes, when using Python you possibly should use it, because it's not as efficient like OCaml is. I prefer to have the data in a data structure, so when changing something I easily can insert a map-function to recalculate the results, without ugly hacking. And always I was astouned on OCaml's efficiency. But when I started with OCaml I also had same ideas in my head: I couldn't believe that it's true how efficient OCaml is. But you have to do very heavy things to come to the limits. I doubt that you are at that point. :-) Ciao, Oliver