Re: [code] [for discussion] map-trie

From: Francesco <gkinkie_at_gmail.com>
Date: Thu, 12 Jun 2014 13:23:10 +0200

On 12 Jun 2014, at 11:33, Francesco <gkinkie_at_gmail.com> wrote:

> It's currently one single typedef in libtrie. Could be made templatized with no effort.
> However libtrie needs some work still: it can't be walked, it's not type-safe, it can't be used for algorithms.
> I expect I could merge the work I've done on the ternary search trie (lp:~kinkie/squid/tst) and this to have a fully-functional trie implementation in a few days of work, exposing the same API as std::map, having level-compact-trie or full-trie implementation via a template parameter.

.. a followup to myself: the current code has a bug: if the domain list contains
.example.com
www.example.com

then a match for wwww.example.com will fail, while it shouldn't.
Fixing this is trivial but decreases the efficiency a bit, unfortunately.

Kinkie
Received on Thu Jun 12 2014 - 11:23:20 MDT

This archive was generated by hypermail 2.2.0 : Fri Jun 13 2014 - 12:00:13 MDT