Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Dario Teixeira <darioteixeira@yahoo.com>
To: luc.maranget@inria.fr, David Allsopp <dra-news@metastack.com>
Cc: 'W Dan Meyer' <wojciech.meyer@googlemail.com>, caml-list@yquem.inria.fr
Subject: RE: [Caml-list] Converting variants with only constant constructors to integers
Date: Tue, 8 Jun 2010 03:21:13 -0700 (PDT)	[thread overview]
Message-ID: <608970.96729.qm@web111516.mail.gq1.yahoo.com> (raw)
In-Reply-To: <015f01cb06ef$500b4f60$f021ee20$@romulus.metastack.com>

Hi,

> > The compiler does not convert the above code to 'hashtable lookup'.
> 
> Is there a point where the compiler does do a table lookup
> for matches rather than jumps or have I clearly just dreamt that? :o)

I think Luc's objection was to the use of the word "hash" in "hashtable".
Using the word "hashtable" for an indexed lookup table is technically
correct if you consider the trivial hash function (the identity function);
this may be what David meant.  Nevertheless, in most people's minds an
hashtable conjures images of a non-trivial mapping, which I'm quite sure
is not what the compiler generates...

Cheers,
Dario Teixeira






  parent reply	other threads:[~2010-06-08 10:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07 18:07 Török Edwin
2010-06-07 18:25 ` [Caml-list] " W Dan Meyer
2010-06-07 18:45   ` bluestorm
     [not found] ` <87sk4y7lc7.fsf@gmail.com>
     [not found]   ` <4C0D3B0F.4060502@gmail.com>
2010-06-07 18:32     ` Török Edwin
2010-06-07 18:50       ` W Dan Meyer
2010-06-07 18:48 ` David Allsopp
2010-06-07 19:46   ` Török Edwin
2010-06-07 19:56     ` bluestorm
2010-06-07 22:51       ` W Dan Meyer
2010-06-08  7:42         ` David Allsopp
2010-06-08  7:59           ` bluestorm
2010-06-08  9:14             ` David Allsopp
2010-06-08  9:36               ` Luc Maranget
2010-06-08  9:45                 ` David Allsopp
2010-06-08  9:51                   ` Luc Maranget
2010-06-08 10:21                     ` David Allsopp
2010-06-08 10:21                   ` Dario Teixeira [this message]
2010-06-08 11:28       ` Kaustuv Chaudhuri
2010-06-08 11:40         ` bluestorm
2010-06-08 14:37           ` Jacques Garrigue
2010-06-08 18:22             ` Kaustuv Chaudhuri
2010-06-09  1:34               ` Jacques Garrigue
2010-08-23 14:36               ` Damien Doligez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=608970.96729.qm@web111516.mail.gq1.yahoo.com \
    --to=darioteixeira@yahoo.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=dra-news@metastack.com \
    --cc=luc.maranget@inria.fr \
    --cc=wojciech.meyer@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox