Message212553
This alternative implementation runs over the ``addresses`` collection only once, and "backtracks" only if necessary. Inspired by a "shift-reduce" approach.
Technically both are O(n), so the best case is always the same. But the old implementation runs over the *complete* list multiple times until it cannot make any more optimisations. The new implementation only repeats the optimisation on elements which require reconciliation.
Tests on a local machine have shown a considerable increase in speed on large collections of elements (iirc about twice as fast on average). |
|
Date |
User |
Action |
Args |
2014-03-02 14:39:00 | exhuma | set | recipients:
+ exhuma, ncoghlan, pmoody |
2014-03-02 14:39:00 | exhuma | set | messageid: <1393771140.68.0.719869740699.issue20826@psf.upfronthosting.co.za> |
2014-03-02 14:39:00 | exhuma | link | issue20826 messages |
2014-03-02 14:39:00 | exhuma | create | |
|