Skip to content

remove some refs in TraversableOnce#8732

Merged
lrytz merged 1 commit intoscala:2.12.xfrom
rorygraves:mike/2.12.x_quickTraversable
Feb 27, 2020
Merged

remove some refs in TraversableOnce#8732
lrytz merged 1 commit intoscala:2.12.xfrom
rorygraves:mike/2.12.x_quickTraversable

Conversation

@mkeskells
Copy link
Contributor

No description provided.

@scala-jenkins scala-jenkins added this to the 2.12.12 milestone Feb 20, 2020
@diesalbla diesalbla added the library:collections PRs involving changes to the standard collection library label Feb 20, 2020
@mkeskells mkeskells force-pushed the mike/2.12.x_quickTraversable branch from 4a1c47b to d2711cb Compare February 20, 2020 14:06
@mkeskells mkeskells force-pushed the mike/2.12.x_quickTraversable branch from d2711cb to 501533a Compare February 20, 2020 14:35
Copy link
Member

@retronym retronym left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be neat if we could teach the optimizer to do this but it would be a serious job.

Back here in the real world, this LGTM.

Separately, it might also be worthwhile overriding the most commonly used ones of these in the most commonly used collections (forSome { "common" }). This could extract further performance gains by:

  • avoiding the lambda allocation altogether
  • avoiding the virtual call from, e.g. List.foreach to counter.apply inside the loop

@retronym retronym modified the milestones: 2.12.12, 2.12.11 Feb 26, 2020
@lrytz lrytz merged commit ab4d97e into scala:2.12.x Feb 27, 2020
@SethTisue
Copy link
Member

this caused a community build regression; see scala/scala-dev#673

@SethTisue
Copy link
Member

#8769 has the partial reversion

SethTisue added a commit that referenced this pull request Feb 29, 2020
[nomerge] partially revert #8732 to remove problematic isEmpty checks
@lrytz lrytz added the performance the need for speed. usually compiler performance, sometimes runtime performance. label Mar 16, 2020
hamzaremmal pushed a commit to hamzaremmal/scala3 that referenced this pull request May 2, 2025
…Traversable

remove some refs in TraversableOnce
hamzaremmal pushed a commit to hamzaremmal/scala3 that referenced this pull request May 2, 2025
hamzaremmal pushed a commit to hamzaremmal/scala3 that referenced this pull request May 2, 2025
[nomerge] partially revert scala/scala#8732 to remove problematic isEmpty checks
hamzaremmal pushed a commit to scala/scala3 that referenced this pull request May 7, 2025
…Traversable

remove some refs in TraversableOnce
hamzaremmal pushed a commit to scala/scala3 that referenced this pull request May 7, 2025
hamzaremmal pushed a commit to scala/scala3 that referenced this pull request May 7, 2025
[nomerge] partially revert scala/scala#8732 to remove problematic isEmpty checks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

library:collections PRs involving changes to the standard collection library performance the need for speed. usually compiler performance, sometimes runtime performance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants