<div dir="ltr">As a pure internal data structure you would prefer binary trees - I did include similar tests with the <span class="" id=":1xb.1" tabindex="-1">gb</span>-trees module in my performance analysis. <span class="" id=":1xb.2" tabindex="-1">gb</span>_trees is much faster. The advantage of the b_trees module comes in connection with the storage of large data blocks on external memory. <div><br></div><div>I had a quick look on <span class="" id=":1xb.3" tabindex="-1">emdb</span> (<span class="" id=":1xb.4" tabindex="-1">https</span>://<span class="" id=":1xb.5" tabindex="-1">github</span>.com/<span class="" id=":1xb.6" tabindex="-1">alepharchives</span>/<span class="" id=":1xb.7" tabindex="-1">emdb</span>) which is the <span class="" id=":1xb.8" tabindex="-1">Erlang</span> wrapper of <span class="" id=":1xb.9" tabindex="-1">LMDB</span>. I couldn't see a traversal operation. So it seems to be difficult to do range scans.<div><br></div><div>The main advantages of the b_trees module (<span class="" id=":1xb.10" tabindex="-1">https</span>://<span class="" id=":1xb.11" tabindex="-1">github</span>.com/<span class="" id=":1xb.12" tabindex="-1">walter</span>-<span class="" id=":1xb.13" tabindex="-1">weinmann</span>/b_trees) are:</div><div><br></div><div><ul><li>pure <span class="" id=":1xb.14" tabindex="-1">Erlang</span> implementation,</li><li>very similar API to the <span class="" id=":1xb.15" tabindex="-1">gb</span>_trees module,</li><li>implementation of standard algorithms (see <span class="" id=":1xb.16" tabindex="-1">Cormen</span>, Introduction to Algorithms, Chapter 18 B-Trees)</li><li>key sort is <span class="" id=":1xb.17" tabindex="-1">pluggable</span></li><li>data storage is <span class="" id=":1xb.18" tabindex="-1">pluggable</span></li></ul><div>So I suppose the b_trees module would only be applied in connection with external memory.</div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 December 2016 at 03:20, Richard A. O'Keefe <span dir="ltr"><<a href="mailto:ok@cs.otago.ac.nz" target="_blank">ok@cs.otago.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What are the advantages of B-trees as an internal data structure?<br>
Would it be possible to layer something like this on top of lmdb?<br>
______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/list<wbr>info/erlang-questions</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"> <br><span style="font-size:8pt;font-family:Arial,sans-serif">___________________________________________________________________________<br><b><font color="#0000ff" style="background-color:rgb(255,255,255)">Walter Weinmann</font></b></span></div><div dir="ltr"><span style="font-family:Arial,sans-serif;font-size:8pt">___________________________________________________________________________</span><br></div><div dir="ltr"><span lang="DE" style="font-size:8pt;font-family:Arial,sans-serif">Obertorplatz 4<br>CH-4130 Rheinfelden<br><font color="#000000"><span style="font-size:8pt">Tel </span><a value="+41618269006" style="font-size:8pt">+41 (0)61 841 06 10</a></font><br></span></div><div dir="ltr"><span style="font-family:Arial,sans-serif;font-size:10.6667px">___________________________________________________________________________</span><br style="font-family:Arial,sans-serif;font-size:10.6667px"><span style="font-family:Arial,sans-serif;font-size:10.6667px">Schulstrasse 1</span><br style="font-family:Arial,sans-serif;font-size:10.6667px"><span style="font-family:Arial,sans-serif;font-size:10.6667px">CH-6037 Root</span></div><div dir="ltr"><font color="#000000"><span style="font-family:Arial,sans-serif;font-size:10.6667px">Tel </span><a value="+41618269006" style="font-family:Arial,sans-serif;font-size:10.6667px">+41 (0)41 530 39 70</a></font><br style="font-family:Arial,sans-serif;font-size:10.6667px"></div></div><div dir="ltr"><a value="+41618269006" style="font-family:Arial,sans-serif;font-size:10.6667px;color:rgb(17,85,204)"><span style="color:rgb(34,34,34);font-size:10.6667px">___________________________________________________________________________</span><br style="color:rgb(34,34,34);font-size:10.6667px"></a></div></div></div></div></div></div></div>
</div>