Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


Hello,

As this bug report (
https://bugs.documentfoundation.org/show_bug.cgi?id=109097) suggests
it is highly desirable to improve the lookup time in multi_type_vector
(currently in worst case
it takes O(N)) without position hints. One way to improve the situation is
to store absolute
position of first element of each block in the block instead of the block
size member. This
can improve the lookup time up to log(log(N)) using linear interpolation
search or at least log(N)
if we fallback to binary search after a few initial passes of
linear-interpolation search.

Down side of this approach is that in the worst case, insert/deletes incur
O(N) cost because
absolute positions stored in each block subsequent to the delete/insert
block have to be changed,
but this still would be way better than old cell storage case when there
was no concept of blocks.

Before working on any change from my side, I would love to hear everyone's
thoughts on the topic first. Thanks !

Regards,
Dennis

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.