Skip to content

Conversation

@dgud
Copy link
Contributor

@dgud dgud commented Nov 26, 2025

Increase jump tables, avoid move instructions and remove a function call for category lookup.

dgud added 3 commits November 26, 2025 09:45
Make jump tables larger
Postpone cons creation, make gc_1 with two arguments instead of one.
Reduces move instructions.
@dgud dgud requested a review from Copilot November 26, 2025 08:48
@dgud dgud self-assigned this Nov 26, 2025
@dgud dgud added the team:PS Assigned to OTP team PS label Nov 26, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

CT Test Results

    2 files     97 suites   1h 7m 45s ⏱️
2 223 tests 2 172 ✅ 51 💤 0 ❌
2 613 runs  2 557 ✅ 56 💤 0 ❌

Results for commit 027a4f5.

♻️ 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

Copilot finished reviewing on behalf of dgud November 26, 2025 08:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements Unicode optimizations in the code generator script that produces Erlang's Unicode utility module. The changes focus on improving the efficiency of generated code through better jump table organization, eliminating unnecessary move instructions, and removing a function call in the category lookup path.

Key changes:

  • Refactored category lookup to eliminate the cat_translate function call by having lookup_category return final category tuples directly
  • Changed category_translate from a list of tuples to a map for more efficient lookups during code generation
  • Optimized grapheme cluster boundary detection by changing function signatures from pattern matching on lists to accepting pre-extracted components
  • Added merge_ranges calls to optimize generated property check functions
  • Introduced split_small_ranges function to split ranges of size 2 into individual codepoints for better jump table generation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dgud dgud added the testing currently being tested, tag is used by OTP internal CI label Nov 26, 2025
@dgud dgud requested a review from bjorng November 26, 2025 11:09
@dgud dgud merged commit 053b8f0 into erlang:master Nov 27, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:PS Assigned to OTP team PS 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