Skip to content

[stdlib] Delete bad @_effects(readonly) annotation #68223

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

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

nate-chandler
Copy link
Contributor

Dictionary.init(dictionaryLiteral:) was annotated @_effects(readonly) which means among other things that it doesn't release any references. Being an init, however, it consumes its arguments, and so does in fact release.

rdar://114699006

`Dictionary.init(dictionaryLiteral:)` was annotated
`@_effects(readonly)` which means among other things that it doesn't
release any references. Being an init, however, it consumes its
arguments, and so does in fact release.

rdar://114699006
@nate-chandler nate-chandler requested a review from atrick August 30, 2023 19:35
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

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

LGTM

@nate-chandler
Copy link
Contributor Author

Build timed out (after 60 minutes). Marking the build as aborted.
Build was aborted
Adding one-line test results to commit status...

@swift-ci please test windows platform

@nate-chandler
Copy link
Contributor Author

@swift-ci please benchmark

@nate-chandler
Copy link
Contributor Author

@swift-ci please apple silicon benchmark

@nate-chandler
Copy link
Contributor Author

### Performance (x86_64): -O

**Regression**                         | **OLD** | **NEW** | **DELTA** | **RATIO**
:---                                   | ---:   | ---:   | ---:   | ---:     
FlattenListFlatMap                     | 2397.0 | 4402.0 | +83.6% | **0.54x (?)**
SIMDReduce.Int32x4.Cast                | 26.879 | 28.967 | +7.8%  | **0.93x (?)**
Array.removeAll.keepingCapacity.Object | 6.356  | 6.846  | +7.7%  | **0.93x (?)**
  | | | | 
**Improvement**                        | **OLD** | **NEW** | **DELTA** | **RATIO**
ArrayAppendGenericStructs              | 1397.5 | 1250.0 | -10.6% | **1.12x (?)**

### Code size: -O

**Regression**               | **OLD** | **NEW** | **DELTA** | **RATIO**
:---                         | ---:  | ---:  | ---:  | ---:   
DictOfArraysToArrayOfDicts.o | 21379 | 21747 | +1.7% | **0.98x**

### Performance (x86_64): -Osize

**Regression**     | **OLD** | **NEW** | **DELTA** | **RATIO**
:---               | ---: | ---:  | ---:    | ---:     
StringWithCString2 | 0.0 | 0.002 | +200.0% | **0.33x (?)**

### Code size: -Osize


### Performance (x86_64): -Onone

**Improvement**           | **OLD**  | **NEW** | **DELTA** | **RATIO**
:---                      | ---:     | ---:  | ---:   | ---:     
ArrayAppendGenericStructs | 1786.667 | 998.0 | -44.1% | **1.79x (?)**
StringWithCString2        | 0.006    | 0.004 | -28.6% | **1.40x (?)**

### Code size: -swiftlibs

@nate-chandler nate-chandler marked this pull request as ready for review August 31, 2023 03:07
@nate-chandler
Copy link
Contributor Author

### Performance (arm64): -O

**Regression**                          | **OLD** | **NEW** | **DELTA** | **RATIO**
:---                                    | ---:    | ---:    | ---:   | ---:     
ObserverForwarderStruct                 | 179.231 | 201.923 | +12.7% | **0.89x (?)**
  | | | | 
**Improvement**                         | **OLD** | **NEW** | **DELTA** | **RATIO**
NaiveRRC.append.smallContiguousRepeated | 85.053  | 69.464  | -18.3% | **1.22x (?)**
SIMDReduce.Int32x16.Initializer         | 13.417  | 11.073  | -17.5% | **1.21x (?)**

### Code size: -O

**Regression**               | **OLD** | **NEW** | **DELTA** | **RATIO**
:---                         | ---:  | ---:  | ---:  | ---:   
DictOfArraysToArrayOfDicts.o | 17842 | 18126 | +1.6% | **0.98x**

### Performance (arm64): -Osize

**Improvement**         | **OLD** | **NEW** | **DELTA** | **RATIO**
:---                    | ---:    | ---:    | ---:   | ---:     
ObserverForwarderStruct | 219.348 | 192.885 | -12.1% | **1.14x (?)**

### Code size: -Osize


### Performance (arm64): -Onone

**Regression**                         | **OLD** | **NEW** | **DELTA** | **RATIO**
:---                                   | ---:    | ---:    | ---:   | ---:     
Array.removeAll.keepingCapacity.Object | 2.316   | 2.56    | +10.5% | **0.90x (?)**
ObjectiveCBridgeStubFromNSString       | 675.0   | 727.0   | +7.7%  | **0.93x (?)**
  | | | | 
**Improvement**                        | **OLD** | **NEW** | **DELTA** | **RATIO**
ArrayAppendGenericStructs              | 856.364 | 685.385 | -20.0% | **1.25x (?)**

### Code size: -swiftlibs

@nate-chandler nate-chandler merged commit 55292e2 into swiftlang:main Aug 31, 2023
@nate-chandler nate-chandler deleted the rdar114699006 branch August 31, 2023 13:19
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.

2 participants