From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id C2E587EE99 for ; Tue, 21 Jan 2014 03:06:04 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of berenger@riken.jp) identity=pra; client-ip=134.160.33.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of berenger@riken.jp designates 134.160.33.176 as permitted sender) identity=mailfrom; client-ip=134.160.33.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@postman.riken.jp designates 134.160.33.176 as permitted sender) identity=helo; client-ip=134.160.33.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="postmaster@postman.riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AokDANPU3VKGoCGwh2dsb2JhbABZvGuCfQqBJA4BAQEKCwkHFiiCJQEBAQQ4QBELGAkWDwkDAgECAUUTCAEBiAHEDhePBhaEIgEDiUWOXZVU X-IPAS-Result: AokDANPU3VKGoCGwh2dsb2JhbABZvGuCfQqBJA4BAQEKCwkHFiiCJQEBAQQ4QBELGAkWDwkDAgECAUUTCAEBiAHEDhePBhaEIgEDiUWOXZVU X-IronPort-AV: E=Sophos;i="4.95,693,1384297200"; d="scan'208";a="45499280" Received: from postman4.riken.jp (HELO postman.riken.jp) ([134.160.33.176]) by mail3-smtp-sop.national.inria.fr with ESMTP; 21 Jan 2014 03:06:03 +0100 Received: from postman.riken.jp (postman4.riken.jp [127.0.0.1]) by postman.riken.jp (Postfix) with SMTP id 23A688280E3 for ; Tue, 21 Jan 2014 11:06:00 +0900 (JST) Received: from watson.prg.gsc.riken.jp (ipm04.gsc.riken.go.jp [134.160.83.74]) by postman.riken.jp (Postfix) with ESMTPA id E7BEA7F803F for ; Tue, 21 Jan 2014 11:05:59 +0900 (JST) Message-ID: <52DDD607.5020507@riken.jp> Date: Tue, 21 Jan 2014 11:05:59 +0900 From: Francois Berenger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: caml-list@inria.fr References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.1.21.15715 Subject: Re: [Caml-list] How much optimized is the 'a option type ? Isn't this thread about people wanting to have monadic code in OCaml going faster? Someone has in mind some optimization that would make all monadic code faster, right? Not only the 'a option case, I hope. On 01/20/2014 08:23 PM, Jonathan Kimmitt wrote: > OCaml already uses the number 1 to represent > 0(sic), [], and None. Type safety prevents them getting mixed up. > The integer 1 would be represented by 3, and so on. Since pointers > are always even (on sensible platforms) this helps the garbage collector > to quickly scan without caring too much about what it all means.