[Xapian-devel] GSOC - Posting list encoding improvements

Olly Betts olly at survex.com
Sat Apr 6 22:04:26 BST 2013


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