apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: Skiplist improvements
Date Fri, 11 Jul 2014 19:57:20 GMT
On Fri, Jul 11, 2014 at 9:38 PM, Jim Jagielski <jim@jagunet.com> wrote:
>
> On Jul 11, 2014, at 12:29 PM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
>
>>>
>>> Maybe we could also leave skiplist as is and introduce a new type
>>> (skipmap?) that would be ordered and that would take both key and
>>> value as arguments (in the relevant functions)...
>>
>
> Yeah... good idea.

OK, will propose that.

I'll commit skiplist's size computation bugfix included in the current
patch, and maybe the stack reuse (to avoid malloc()s for each
insert()).

Regarding apr_skiplist_destroy(), don't you think we should free() the
given pointer when the skiplist was malloc()ated, and have
apr_skiplist_clear() which does not?

Last but not least, apr_skiplist_remove() to remove one (as is) or all
the matching elements?

Mime
View raw message