[Xapian-devel] GSOC - Posting list encoding improvements

Marius Tibeica mtibeica at gmail.com
Sun Apr 7 08:56:19 BST 2013

Yes, that's what i was planning to do. And probably finding the size
of the stack (sizeof(int) comparings) is a lot less costly that all
the reallocations which will happen otherwise.

On Sun, Apr 7, 2013 at 12:04 AM, Olly Betts <olly at survex.com> wrote:
> On Sat, Apr 06, 2013 at 01:22:27PM +0300, Marius Tibeica wrote:
>> Implemented it on https://github.com/mtibeica/xapian
> Cool, I'll take a look.
>> I could also find the size to which the stack will get (the order of
>> the highest bit in k - j) and initialize it to avoit reallocations?
> If you use a vector for the stack storage, then you can use reserve()
> if you know how big it will grow.  That would also probably be a bit
> more compact - std::stack uses std::deque by default, which doesn't
> guarantee to use contiguous storage, but std::vector does.
> Cheers,
>     Olly

More information about the Xapian-devel mailing list