rorygraves / scalac_perf

The Scala programming language
http://www.scala-lang.org/
16 stars 3 forks source link

.distinct is inefficient #44

Open mkeskells opened 6 years ago

mkeskells commented 6 years ago

similar to https://github.com/rorygraves/scalac_perf/issues/26 but specifically for distinct

stats (https://github.com/pkukielka/scala-collections-usage/blob/master/run2/traced.csv) show distinct is called many times on empty collections, and there are many optimisations that can be baked off against each other

127284  scala.collection.immutable.Nil$::distinct()Ljava/lang/Object;
mkeskells commented 6 years ago

made a start in https://github.com/rorygraves/scalac_perf/tree/mike/2.12.x_distinct - just a few ideas

mkeskells commented 6 years ago

@pkukielka can update this issue reference the PRs and update the milestones Is this merged yet? to 2.13