-
Notifications
You must be signed in to change notification settings - Fork 455
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
Clean up Record_optional_labels #7191
Conversation
a793751
to
7fdf2b5
Compare
Clean up Record_optional_labels: determine whether a field is optional directly.
4c44e34
to
27678d5
Compare
There was a problem hiding this 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: c02def3 | Previous: e1b7fb7 | Ratio |
---|---|---|---|
Print RedBlackTreeNoComments.res - time/run |
2.2175484733333333 ms |
2.10057036 ms |
1.06 |
This comment was automatically generated by workflow using github-action-benchmark.
There's now no global set of optional fields stored anywhere, but optional is attached to each field.
compiler/ml/types.ml
Outdated
match y with | ||
| Record_optional_labels lbls2 -> lbls = lbls2 | ||
| Record_optional_labels -> true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check if the labels are the same can be safely removed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes there are no more labels represented here. Each label has its own optionality information.
Later on, we can probably remove the classificationRecord_optional_labels
entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cknitt take a look: removed Record_optional_labels
entirely, now that the information is available directly from the fields.
Removed distinction between regular records and records with optional fields from the back-end. |
Which seems actually more correct. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
]; | ||
} | ||
break; | ||
case "xx1" : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case is now (correctly) optimized away, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite.
Fixed.
Clean up Record_optional_labels: determine whether a field is optional directly.