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=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 657A7BBAF for ; Thu, 13 Aug 2009 00:40:33 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAJ7hgkpbeRpV/2dsb2JhbADTaYQZBYInh20 X-IronPort-AV: E=Sophos;i="4.43,370,1246831200"; d="scan'208";a="32363021" Received: from givry.fdupont.fr ([91.121.26.85]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Aug 2009 00:40:33 +0200 Received: from givry.fdupont.fr (localhost [127.0.0.1]) by givry.fdupont.fr (8.13.8/8.13.8) with ESMTP id n7CMeQmX048236; Thu, 13 Aug 2009 00:40:26 +0200 (CEST) (envelope-from dupont@givry.fdupont.fr) Message-Id: <200908122240.n7CMeQmX048236@givry.fdupont.fr> From: Francis Dupont To: Jacques Garrigue Cc: rixed@happyleptic.org, caml-list@yquem.inria.fr Subject: Re: [Caml-list] ocamlgraph predecessors In-reply-to: Your message of Mon, 10 Aug 2009 10:59:50 +0900. <20090810.105950.42868244.garrigue@math.nagoya-u.ac.jp> Date: Thu, 13 Aug 2009 00:40:26 +0200 Sender: Francis.Dupont@fdupont.fr X-Spam: no; 0.00; usr:01 arrays:01 macos:01 macos:01 wrote:01 caml-list:01 tail:01 tail:01 macros:01 data:02 structures:02 tree:02 python:03 sys:03 bsd:04 In your previous mail you wrote: By the way, BSD uses lots of singly-linked lists, probably because it comes from a time when there was not so much memory. => no, BSDs use an include ([/usr/include]/sys/queue.h) which provides C macros for singly-linked lists, singly-linked tail queues, lists and tail queues. So programmers just select the best data structure for each job (and as BSD programmers are skilled programmers they use signly-linked lists as soon as they don't need a list feature). Note this is not very bound to memory: in many cases there are some structures with better memory use, for instance lists in arrays from Python (standard C implementation). Thanks Francis.Dupont@fdupont.fr PS: just type "man queue" on a BSD (including MacOS X). If it is not enough try "man tree" (but not yet on my MacOS X, sorry)...