From: Chris Hecker <checker@d6.com>
To: caml-list@inria.fr
Subject: [Caml-list] why does hashtbl not use lists?
Date: Tue, 10 Jul 2001 01:34:25 -0700 [thread overview]
Message-ID: <4.3.2.7.2.20010710013127.02c06600@shell16.ba.best.com> (raw)
Why does hashtbl.ml (from the standard library) use the bucketlist variant instead of just the built in lists with tuples? Is there an efficiency thing going on here?
type ('a, 'b) t =
{ mutable max_len: int; (* max length of a bucket *)
mutable data: ('a, 'b) bucketlist array } (* the buckets *)
and ('a, 'b) bucketlist =
Empty
| Cons of 'a * 'b * ('a, 'b) bucketlist
instead of
type ('a, 'b) t =
{ mutable max_len: int; (* max length of a bucket *)
mutable data: ('a * 'b) list array } (* the buckets *)
Chris
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
next reply other threads:[~2001-07-10 8:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-10 8:34 Chris Hecker [this message]
2001-07-10 9:00 ` Fergus Henderson
2001-07-10 9:05 ` Jean-Christophe Filliatre
2001-07-10 9:42 ` Fergus Henderson
2001-07-10 14:44 ` Xavier Leroy
2001-07-10 17:04 Charles Martin
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=4.3.2.7.2.20010710013127.02c06600@shell16.ba.best.com \
--to=checker@d6.com \
--cc=caml-list@inria.fr \
/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