Opened 11 years ago

Closed 9 years ago

#5787 closed Patches (fixed)

[multi_index] Suboptimal non-unique hash table

Reported by: vvoznesensky@… Owned by: Joaquín M López Muñoz
Milestone: To Be Determined Component: multi_index
Version: Boost 1.47.0 Severity: Optimization
Keywords: Cc:

Description

Computational complexity on non-unique hash table index operations are O(<number of non-unique elements for the given hash value>).

I've prepared a patch: an optional dual-linked list could be used instead of a single-linked one.

Please, find a diff in the attachment.

Attachments (1)

optimize_multi_index.patch (16.7 KB ) - added by voznesensky@… 11 years ago.
Patch to optimize hashed_non_unique index of multi_index

Download all attachments as: .zip

Change History (4)

by voznesensky@…, 11 years ago

Attachment: optimize_multi_index.patch added

Patch to optimize hashed_non_unique index of multi_index

comment:1 by Joaquín M López Muñoz, 9 years ago

Starting with Boost.1.56, hashed indices will use a new internal data structure allowing for O(1) erase(iterator).

https://svn.boost.org/trac/boost/changeset/86264

A preview can be obtained by just downloading from the current Boost trunk branch. Any feedback on the performance within real-life scenarios is greatly appreciated. Waiting to such feedback before closing the bug.

comment:2 by vvoznesensky@…, 9 years ago

Sorry, Joaquin, have no time for stress-testing your great refactoring at the current period.

comment:3 by Joaquín M López Muñoz, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.