From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 6BDC57F712 for ; Fri, 24 Jan 2014 09:34:17 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of rossberg@mpi-sws.org) identity=pra; client-ip=139.19.1.49; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rossberg@mpi-sws.org"; x-sender="rossberg@mpi-sws.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of rossberg@mpi-sws.org designates 139.19.1.49 as permitted sender) identity=mailfrom; client-ip=139.19.1.49; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rossberg@mpi-sws.org"; x-sender="rossberg@mpi-sws.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@hera.mpi-klsb.mpg.de) identity=helo; client-ip=139.19.1.49; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rossberg@mpi-sws.org"; x-sender="postmaster@hera.mpi-klsb.mpg.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnIBANQk4lKLEwExnGdsb2JhbABawFKBIw4BAQEBAQgLCQkUKIIlAQEBBDoGAQE3AQ8LGC5XGYgFBKoIhFIBBZkIEQaOTTMHFoMOgRSebI8K X-IPAS-Result: AnIBANQk4lKLEwExnGdsb2JhbABawFKBIw4BAQEBAQgLCQkUKIIlAQEBBDoGAQE3AQ8LGC5XGYgFBKoIhFIBBZkIEQaOTTMHFoMOgRSebI8K X-IronPort-AV: E=Sophos;i="4.95,711,1384297200"; d="scan'208";a="54654983" Received: from infao0809.mpi-klsb.mpg.de (HELO hera.mpi-klsb.mpg.de) ([139.19.1.49]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 24 Jan 2014 09:34:17 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mpi-sws.org; s=mail200803; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Content-Type:Mime-Version:Subject; bh=dSJVW745DFmHYPh4c3dC5Y6299rc4zxEF4pJNNseNWI=; b=AiP3MeHIbuHIYyo3waF9/SeVmfXlAa176oZ7ctDsJzT8k+9XbCG529kmpe+NcbG70udFs0EQ/HayprVtvGqcejUM5r5xcbyhVYldQukpyNTenyR83/Q4xy6uVkNgF/goaNiDZBBOGIb3vZ6NmkEVHu0QrN+S2Q++ESd3vd8WfR8=; Received: from zak.mpi-klsb.mpg.de ([139.19.1.29]:53315) by hera.mpi-klsb.mpg.de (envelope-from ) with esmtp (Exim 4.80) id 1W6cDO-0004Aq-8W; Fri, 24 Jan 2014 09:34:16 +0100 Received: from mnch-5d86b9dd.pool.mediaways.net ([93.134.185.221]:51179 helo=[192.168.178.44]) by zak.mpi-klsb.mpg.de (envelope-from ) with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) id 1W6cDN-0004ms-RH; Fri, 24 Jan 2014 09:34:13 +0100 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Content-Type: text/plain; charset=us-ascii From: Andreas Rossberg In-Reply-To: <026101cf18dd$756c13d0$60443b70$@ffconsultancy.com> Date: Fri, 24 Jan 2014 09:34:13 +0100 Cc: Ocaml Mailing List Content-Transfer-Encoding: quoted-printable Message-Id: References: <20140120101654.GI26447@frosties> <08bc01cf17b8$9263d070$b72b7150$@ffconsultancy.com> <20140123092925.GB20624@frosties> <01c401cf1891$b1fb1360$15f13a20$@ffconsultancy.com> <026101cf18dd$756c13d0$60443b70$@ffconsultancy.com> To: jon@ffconsultancy.com X-Mailer: Apple Mail (2.1827) X-MPI-Local-Sender: true Subject: Re: [Caml-list] How much optimized is the 'a option type ? On Jan 24, 2014, at 09:22 , Jon Harrop wrote: > With value types you can almost completely avoid the garbage collector by > replacing pointers with indices into an array of value types that acts as= a > pool allocator. This can be useful for avoiding GC latency and for > optimizing for collections that violate the generational hypothesis (e.g. > long-lived Sets and Maps). As you well know, though, pervasive unboxing as for value types is incompat= ible with a uniform representation approach like used by OCaml. And non-uni= form representation requires either static monomorphisation (not possible i= n OCaml, because of first-class polymorphism and separate compilation), or = dynamic monomorphisation (not possible without just-in-time compilation), o= r runtime type passing and switching (expensive). /Andreas