Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code gen: improve pattern matching of optional fields. #7143

Merged
merged 2 commits into from
Nov 2, 2024

Conversation

cristianoc
Copy link
Collaborator

Pattern matching of optional fields such as

| {x: 1, y: "hello"}

can be specialised as the constants already imply the values cannot be absent.

Pattern matching of optional fields such as
```res
| {x: 1, y: "hello"}
```

can be specialised as the constants already imply the values cannot be absent.
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Syntax Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: e982516 Previous: e1b7fb7 Ratio
Print RedBlackTreeNoComments.res - time/run 2.21412674 ms 2.10057036 ms 1.05

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Member

@cknitt cknitt left a comment

Choose a reason for hiding this comment

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

Very nice!

Copy link
Collaborator

@zth zth left a comment

Choose a reason for hiding this comment

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

So nice!

@cristianoc cristianoc merged commit e1eaad3 into master Nov 2, 2024
20 checks passed
@cristianoc cristianoc deleted the pm_opt_fields branch November 2, 2024 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants