ceylon-sdk icon indicating copy to clipboard operation
ceylon-sdk copied to clipboard

TreeMap.size is slow

Open martyn-evgeny opened this issue 8 years ago • 1 comments

TreeMap.size spends linear time. For example in Java size in TreeMap is just field.

martyn-evgeny avatar Aug 03 '16 13:08 martyn-evgeny

To fix this we would need to add an instance var which keeps a count of additions-removals. I took a quick look at it, and it's not a totally trivial thing to fix. Someone with a tiny bit of free time would need to take a closer look.

gavinking avatar Aug 05 '16 15:08 gavinking