Skip to content

Conversation

bjorng
Copy link
Contributor

@bjorng bjorng commented Oct 2, 2025

With a case with extremely many clauses (say one hundred thousand or more), compilation could become very slow (minutes instead of seconds).

@bjorng bjorng requested a review from lucioleKi October 2, 2025 08:23
@bjorng bjorng self-assigned this Oct 2, 2025
@bjorng bjorng added the team:VM Assigned to OTP team VM label Oct 2, 2025
Copy link
Contributor

github-actions bot commented Oct 2, 2025

CT Test Results

    3 files    419 suites   1h 12m 41s ⏱️
2 925 tests 2 875 ✅ 50 💤 0 ❌
8 110 runs  8 054 ✅ 56 💤 0 ❌

Results for commit b25b91a.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@bjorng bjorng added testing currently being tested, tag is used by OTP internal CI and removed testing currently being tested, tag is used by OTP internal CI labels Oct 2, 2025
lucioleKi
lucioleKi previously approved these changes Oct 3, 2025
bjorng added 2 commits October 6, 2025 11:54
When a `case` had an extreme number of clauses, say hundred thousands
or more, `erl_lint` could spending minutes instead of part of a second
checking the code.

The reason was a function with quadratic complexity caused by
using `lists:partition/1` when `lists:splitwhile/1` would work.
When a `case` had many clauses (say hundred thousand or more) having
all the same body, the beam_core_to_ssa pass could become very
slow.
@bjorng bjorng force-pushed the bjorn/compiler/fix-bottlenecks/OTP-19797 branch from 726d5ff to b25b91a Compare October 6, 2025 09:56
@bjorng bjorng requested a review from lucioleKi October 6, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants