After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 395069 - when filtering threads, can use a linear algorithm instead of O log N
when filtering threads, can use a linear algorithm instead of O log N
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-1.0 betas
Other Linux
: Normal enhancement
: 1.0
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2007-01-10 16:53 UTC by Charles Kerr
Modified: 2007-01-12 15:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use set_union rather than sort/unique/erase (1.82 KB, patch)
2007-01-10 16:54 UTC, Charles Kerr
committed Details | Review

Description Charles Kerr 2007-01-10 16:53:11 UTC
When filtering threads, `fail' is a sorted container.  We append another
sorted range to the end of it, then use STL sort and unique/erase
to resort the container and remove duplicates.  Since both the original
`fail' and the new range are both sorted, we can merge them and remove
duplicates in linear time by using std::set_union.
Comment 1 Charles Kerr 2007-01-10 16:54:15 UTC
Created attachment 79965 [details] [review]
use set_union rather than sort/unique/erase