[Xapian-devel] Optimized VSEncoding

Richard Boulton richard at tartarus.org
Thu Mar 13 08:01:38 GMT 2014


On 13 March 2014 02:41, Hurricane Tong <zhangshangtong.cpp at qq.com> wrote:
>
> When only encoding the first 1000lines,
> both cost 0ms to decode and VS cost 1ms to encode while Interpolative cost
> 0ms,
> 1000lines is just too little to catch the difference in my test.
>

When measuring small times like that there are two approaches you can try:

 - run the test code lots of times.  Ideally, with different data each time
so that you don't get too many cache effects (ie, with the same data, you
might find that subsequent runs are much faster than the first).  So, in
this case, you could try encoding the whole thing, but in chunks of 1000.

 - run the test under a tool like valgrind's "cachegrind", which measures
the theoretical performance on a particular CPU architecture, and gives
precise counts of operations performed.

-- 
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20140313/744acf8d/attachment.html>


More information about the Xapian-devel mailing list