eclipse-collections icon indicating copy to clipboard operation
eclipse-collections copied to clipboard

Optimize TreeSortedMap by pre-sizing result collections.

Open motlin opened this issue 7 years ago • 3 comments

  • Pre-size TreeSortedMap.take/drop.
  • Pre-size AbstractMutableSortedMap.zip.
  • Don't pre-size AbstractMutableSortedMap.select/reject/collectIf.

motlin avatar Jan 23 '18 03:01 motlin

Has anyone started work on this yet? If not, I'd like to take a look at it.

johnjstuart avatar May 21 '20 20:05 johnjstuart

Thanks @johnjstuart ! I've assigned the issue to you.

donraab avatar May 21 '20 23:05 donraab

After some investigation it looks like TreeSortedMap is backed by the JDK TreeMap, which (correct me if I'm wrong) is not pre-sizeable. AbstractMutableSortedMap.zip seems to be already pre-sized to me. As far as I can tell this issue can be closed without a PR.

johnjstuart avatar May 22 '20 15:05 johnjstuart