Proposal: Further performance improvements of Data.Map
|Reported by:||milan||Owned by:|
|Type of failure:||None/Unknown||Difficulty:|
|Test Case:||Blocked By:||#4277|
This proposal further improves the performance of Data.Map. It consists of four patches:
- improvements to union and difference implementation( by eliminating high-order function)
- improvements to balance function which is used by nearly all methods modificating a map (making one monolithic function which allows perform only one pattern-match on the tree nodes)
- correction of the test (the Arbitrary instance could generate unbalanced trees, which the patch 2. discovered)
- added benchmark of union, difference and intersection methods
On i386 Intel Core2 and GHC 6.12.1, the improvements are
alter 5.61 delete 10.80 difference 20.33 insert 8.09 intersection 7.69 union 21.74 update 7.96
The repository of the containers package with these patches (and also several others) is at http://fox.auryn.cz/darcs/containers/.
The patches are also attached.