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=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 70623BC6B for ; Sat, 18 Aug 2007 08:55:46 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7I6tjum020212 for ; Sat, 18 Aug 2007 08:55:46 +0200 Received: by ug-out-1314.google.com with SMTP id o2so384191uge for ; Fri, 17 Aug 2007 23:55:45 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=ciS7ahBa60Y3fHiiZb1/7iH5PxKdJc0HUgTEVi5jxclagoZ5CTC0ByeNQWSz1/FhQET673p1aUa8xc5Oi1AUWNvxY3WXCpW8ND/Ik+1HJP+D9traYfIWXKJRDlc8i/izMsnHRMesVQo1wg3AglAL1gXLErXdZbEQPDIcgMcgaiY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=fO2WmaE7k9vFlFXPnUwFa90jKwyL7NDSkFu2P8B13zscmVW0wDm9Al6RsRfnAcl8jWCnMXT45xCqPHHqxo9g3YGdELMjuFsqta4bxblrB0rNYQGRL/fIABBJs849WoNtfBucDdtl8uflkCycxdVvZURhi+e8SZTjzhhcq6gS/gU= Received: by 10.67.10.12 with SMTP id n12mr3588207ugi.1187420145355; Fri, 17 Aug 2007 23:55:45 -0700 (PDT) Received: from ?192.168.1.33? ( [83.33.68.230]) by mx.google.com with ESMTPS id 2sm6345854nfv.2007.08.17.23.55.42 (version=SSLv3 cipher=OTHER); Fri, 17 Aug 2007 23:55:43 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: <1A6B8F53-FDA5-4F37-BA08-1FBD9CF09E7B@gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: Caml List From: Joel Reymont Subject: What is a match statement translated into? Date: Sat, 18 Aug 2007 07:55:24 +0100 X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 46C697F2.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46C697F2.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; translated:01 ocaml:01 computed:01 branching:01 ocaml:01 match:02 threaded:03 optimized:04 simpler:05 table:93 quite:08 approach:08 suspect:09 haven't:09 folks:12 Folks, Is pattern-matching code in OCaml expanded into threaded code (pre- computed branch table) or something analogous to the C switch statement (lots of branching)? How do I find out? I suspect this should be quite optimized but I haven't tried dumping disassembling native-compiled OCaml yet and I wonder if there's a simpler approach. Thanks, Joel -- http://wagerlabs.com