From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 5CD86BC8B for ; Fri, 4 Feb 2005 14:43:06 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j14Dh5Ib004511 for ; Fri, 4 Feb 2005 14:43:06 +0100 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 OAA24211 for ; Fri, 4 Feb 2005 14:43:05 +0100 (MET) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j14Dh4hf015964 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 4 Feb 2005 14:43:05 +0100 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1Cx3jk-0002SC-00 for ; Fri, 04 Feb 2005 13:43:04 +0000 Date: Fri, 4 Feb 2005 13:43:04 +0000 From: "Richard W. M. Jones" Cc: caml-list@inria.fr Subject: Re: [Caml-list] Estimating the size of the ocaml community Message-ID: <20050204134304.GC19985@furbychan.cocan.org> References: <20050204.111102.71086746.oandrieu@nerim.net> <005501c50aaa$b35d9560$0100a8c0@mshome.net> <20050204121505.GA31752@furbychan.cocan.org> <23368.192.168.0.1.1107521496.squirrel@gps.dynxs.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23368.192.168.0.1.1107521496.squirrel@gps.dynxs.de> User-Agent: Mutt/1.3.28i Sender: Richard Jones X-Miltered: at concorde with ID 42037BE9.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 42037BE9.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 gerd:01 stolpmann:01 wrote:01 hash:01 notepad:01 structures:01 structures:01 slower:01 encode:01 strings:01 strings:01 argument:01 data:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Fri, Feb 04, 2005 at 01:51:36PM +0100, Gerd Stolpmann wrote: > Sure, this is an option, but I think the price is quite high. A number of > frequently used data structures would need a lot more memory, and would > become slower. For example lists. Currently, every list element needs > three words (header + contents + reference to next element). If the > variant tag is not part of the header, another word is needed = 33 % > more space. There are similar effects for many basic data > structures, including options, trees and hash tables. Actually, I wouldn't want to change lists. Those currently have a tag = 0, and it would important to leave those untouched for exactly the reason you described. Of course, now you've pointed out the flaw in my argument, which is that lists would be handled differently from constructs :-) > If one wanted really to improve the situation, it would be better to change > the representation of strings, and to encode the string length in the > first word after the header. This wastes much less memory (except in the > special case when you have many small strings), and is probably neutral > for the execution speed. But then you'd need a special case to handle values-containing- strings, vs. values-not-containing strings, because you'd always want to have the size attribute of the header reflect the size of the data in the value. Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com