From: Benjamin Purcell <benjapurcell@gmail.com>
To: 9front@9front.org
Subject: Re: [9front] New Balanced Search Tree Implementation
Date: Mon, 12 Dec 2016 12:02:59 -0600 [thread overview]
Message-ID: <CAAsuYKcM7vwebC8cZnHeiphtVXMvrSt7B5M0nwAiw_A552T6fg@mail.gmail.com> (raw)
In-Reply-To: <CAAsuYKcOpWqKFMPEGXVQh90VCD28ictF4CP5xa=PTAN8xUhYsQ@mail.gmail.com>
> a better way would be to provide separate functions, that way if you
> only use bstcreateavl(), you'll only link in the avl code... but you
> can still have your common interface structure.
This is now done and the repos are updated. The venti code also has
been updated.
On Mon, Dec 12, 2016 at 11:18 AM, Benjamin Purcell
<benjapurcell@gmail.com> wrote:
>> Then why even implement it then when its always slower than avl?
>> you could get rid of the indirection...
>
> 1. In the interest of keeping 9front in the tradition of not only an
> OS we use but also an OS for research and learning, I think it's good
> in its own right to have an implementation of another classic balanced
> tree with interesting invariant properties.
> 2. RB trees are often touted as having better behavior than AVL trees
> and especially in recent years there has been controversy over the
> left leaning variant. Having comparable implementations of the two
> trees together in one OS gives a living example of why AVL and only
> AVL is the one true BST. This is In the same way that keeping acme and
> sam around clearly shows that ED is the one true editor.
>
>> another point about using enum constants to set the algorithm mode
>> has the disadvantage that you always have to link in all the implementations
>> even if you are not using them...
>>
>> a better way would be to provide separate functions, that way if you
>> only use bstcreateavl(), you'll only link in the avl code... but you
>> can still have your common interface structure.
>
> That is a great point and I'll make that change soon.
>
>> --
>> cinap
prev parent reply other threads:[~2016-12-12 18:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 6:30 Benjamin Purcell
2016-12-12 6:38 ` [9front] " Mehmet Erol Sanliturk
2016-12-12 6:40 ` Benjamin Purcell
2016-12-12 14:30 ` cinap_lenrek
2016-12-12 15:36 ` Steve Simon
2016-12-12 16:24 ` Benjamin Purcell
2016-12-12 16:32 ` cinap_lenrek
2016-12-12 16:36 ` cinap_lenrek
2016-12-12 17:18 ` Benjamin Purcell
2016-12-12 18:02 ` Benjamin Purcell [this message]
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=CAAsuYKcM7vwebC8cZnHeiphtVXMvrSt7B5M0nwAiw_A552T6fg@mail.gmail.com \
--to=benjapurcell@gmail.com \
--cc=9front@9front.org \
/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).