-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Constant Evaluator] Move "string.append" semantics attribute from String.+=
function to String.append
function.
#24397
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
[Constant Evaluator] Move "string.append" semantics attribute from String.+=
function to String.append
function.
#24397
Conversation
`String.+=` function to `String.append` function, and use a new semantics attribute for String.+=. Teach the constant evaluator about `String.Append` instead of `String.+=`.
@swift-ci Please smoke test |
@swift-ci benchmark |
Performance: -O
Performance: -Osize
How to read the dataThe tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.If you see any unexpected regressions, you should consider fixing the Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
@swift-ci benchmark |
Performance: -O
Performance: -Osize
How to read the dataThe tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.If you see any unexpected regressions, you should consider fixing the Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
Doesn't look like the regressing benchmarks are using String append (except for StringBuilderLong). I think this is just noise, considering the last two results. |
@swift-ci benchmark |
Performance: -Osize
Performance: -Onone
How to read the dataThe tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.If you see any unexpected regressions, you should consider fixing the Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
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.
lgtm
@swift-ci Please test and merge |
String.+= is given a new semantics attribute "string.plusequals".
Teach the constant evaluator about
String.append
instead ofString.+=
.With this change,
String.append
is the primitive whose semantics is built into the constant evaluator. This makes the evaluator a bit more general asString.append
is also used byString.+
(string concatenation).