caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Damien Guichard" <alphablock@orange.fr>
To: "Caml List" <caml-list@inria.fr>
Subject: Re: [Caml-list] Why AVL-tree?
Date: Mon, 2 Jun 2014 15:21:02 +0200	[thread overview]
Message-ID: <543099239773658961@orange.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 545 bytes --]

 
Red-black tree would spare a machine word per node, because a red-black tree
doesn't need depth information. 
Hence the reason is either historical or a space/speed trade-off (comparing
two depths may be faster than pattern matching). 
 
Regards,
 
damien guichard 
Hi, list, 


Just from the curiosity, why balanced binary trees used in Set and Map are
AVL-trees, not their alternative, say, red-black trees?  Is there a deep
reason for it, or just a historical one?


Best,
-- 

Yoriyuki Yamagata
http://yoriyuki.info/

[-- Attachment #2: Type: text/html, Size: 1539 bytes --]

             reply	other threads:[~2014-06-02 13:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02 13:21 Damien Guichard [this message]
2014-06-02 13:34 ` Andrew Herron
2014-06-02 15:06   ` Gabriel Scherer
2014-06-03 12:48     ` Yaron Minsky
2014-06-03 13:12       ` Gabriel Scherer
2014-06-03 13:37         ` Yaron Minsky
2014-06-03 13:41       ` Yoriyuki Yamagata
2014-06-02 16:57   ` Xavier Leroy
2014-06-02 21:16     ` Andrew Herron
2014-06-10 18:19     ` jonikelee
2014-06-10 18:51       ` Florian Hars
2014-06-10 19:52         ` Jonathan
2014-06-15  4:51       ` Lukasz Stafiniak
2014-06-15 14:01         ` Jonathan
2014-08-03 21:25     ` Diego Olivier Fernandez Pons
  -- strict thread matches above, loose matches on Subject: below --
2014-06-02 18:23 Damien Guichard
2014-06-02 11:48 Yoriyuki Yamagata

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=543099239773658961@orange.fr \
    --to=alphablock@orange.fr \
    --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;
as well as URLs for NNTP newsgroup(s).