From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 7B68ABC57 for ; Tue, 8 Jun 2010 12:21:16 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkYCAOO2DUxDww/fi2dsb2JhbACDHY5jjFYBAQEKCwoHDwUfq3E5ggKFY4h9AQQEAYEhgTKBUG4Eg0c X-IronPort-AV: E=Sophos;i="4.53,383,1272837600"; d="scan'208";a="64170455" Received: from web111516.mail.gq1.yahoo.com ([67.195.15.223]) by mail4-smtp-sop.national.inria.fr with SMTP; 08 Jun 2010 12:21:15 +0200 Received: (qmail 99069 invoked by uid 60001); 8 Jun 2010 10:21:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1275992473; bh=hiF5LDy/9ipJ4RTmyJCrJzt4bNdaw6a8rygfFN5tk3A=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Lzng3s/KsDEDCkmfHsujKnCz0Z5YCiFEvl9r4+usTE4SdOYV2iKyXfYOb1U8HA9+Dn2SDyXlSyrw1LhiZ7pjUkpeUkT17E1joB63PIpq9rxbCOSTtEmX24jVN2QxVTis0Z2luFg3ZppsV3WxHi2kfTsXnCccbYyQgxy3f6Me9AU= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=z4YC4tsvQEFGNFEh7wWa9Xm5m5gwbc9xwknrS7tamspbET27z9FGl/nrnwUJ/rwbGqUfnPUsZULReOaRyCP8vaBY21VV23cC8nJ6T+gd8ykw/hNnu+suSiF6pUSWFF2IGZ7++hasjybFcfqd+00bM6xf9/c5NubQ4ChLThUmUqw=; Message-ID: <608970.96729.qm@web111516.mail.gq1.yahoo.com> X-YMail-OSG: 1agPDS8VM1lxQUjOG_aMHpBDCIPjrAwjp9ZEV5nYFO0cR6t 9ZmgtAFXSZ5SwvUcXCZxpmx5AHTMDndySTaWNirh8zCpjRWGaOtRgZfDIH9J UXynMgRVRtuBb0b1TJJSO2OZXWza44YHtyJvnhiDaeZn24AlS5XQ3SNYKNHu .bCj4GEgBtBhurO_hafBpFLfpHop8JEKDK.Lh46TKMcs5UdrsISlsEVspTJe bEKPPiJTWt2Td8Jyt0TdUB0mfhGc6dYHqAp4iYrbYoXtvNzsCLNoQbl00HpY ExWyFN_YVYrndfidZOIwv8tDVV7Ei2vAel9UmTa.d Received: from [213.205.71.56] by web111516.mail.gq1.yahoo.com via HTTP; Tue, 08 Jun 2010 03:21:13 PDT X-Mailer: YahooMailClassic/11.1.3 YahooMailWebService/0.8.103.269680 Date: Tue, 8 Jun 2010 03:21:13 -0700 (PDT) From: Dario Teixeira Subject: RE: [Caml-list] Converting variants with only constant constructors to integers To: luc.maranget@inria.fr, David Allsopp Cc: 'W Dan Meyer' , caml-list@yquem.inria.fr In-Reply-To: <015f01cb06ef$500b4f60$f021ee20$@romulus.metastack.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; variants:01 constructors:01 integers:01 compiler:01 lookup':01 compiler:01 hash:01 hashtable:01 hashtable:01 trivial:01 hash:01 non-trivial:01 cheers:01 dreamt:98 caml-list:01 Hi,=0A=0A> > The compiler does not convert the above code to 'hashtable loo= kup'.=0A> =0A> Is there a point where the compiler does do a table lookup= =0A> for matches rather than jumps or have I clearly just dreamt that? :o)= =0A=0AI think Luc's objection was to the use of the word "hash" in "hashtab= le".=0AUsing the word "hashtable" for an indexed lookup table is technicall= y=0Acorrect if you consider the trivial hash function (the identity functio= n);=0Athis may be what David meant. Nevertheless, in most people's minds a= n=0Ahashtable conjures images of a non-trivial mapping, which I'm quite sur= e=0Ais not what the compiler generates...=0A=0ACheers,=0ADario Teixeira=0A= =0A=0A=0A