Skip to content

[stdlib] fix an indexing inconsistency #38091

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 2 commits into from
Jun 10, 2022
Merged

Conversation

glessard
Copy link
Contributor

This iteration ranged from buffer.startIndex until buffer.count, rather than buffer.endIndex.
The latter is more coherent with the indexing model, even though the former happens to work.

No SR.

@glessard glessard requested a review from lorentey June 24, 2021 22:47
@glessard glessard self-assigned this Jun 24, 2021
@glessard glessard removed their assignment Jul 16, 2021
@glessard
Copy link
Contributor Author

@swift-ci please smoke test

@glessard glessard changed the title [stdlib] fix an indexing inconstency [stdlib] fix an indexing inconsistency Aug 24, 2021
@glessard glessard force-pushed the indexing-model branch 2 times, most recently from 633e036 to 6fbd01f Compare October 12, 2021 22:14
glessard and others added 2 commits October 16, 2021 12:46
This iteration ranged from `buffer.startIndex` to `buffer.count`, rather than to `buffer.endIndex`.
Using `buffer.indices` is a better solution in any case.
@glessard
Copy link
Contributor Author

@swift-ci please benchmark

@glessard
Copy link
Contributor Author

@swift-ci please smoke test

@swift-ci
Copy link
Contributor

Performance (x86_64): -O

Regression OLD NEW DELTA RATIO
FlattenListFlatMap 4727 6769 +43.2% 0.70x (?)
 
Improvement OLD NEW DELTA RATIO
ObjectiveCBridgeFromNSSetAnyObjectForced 5780 5400 -6.6% 1.07x (?)

Code size: -O

Performance (x86_64): -Osize

Regression OLD NEW DELTA RATIO
String.data.LargeUnicode 102 114 +11.8% 0.89x (?)
String.data.Medium 105 114 +8.6% 0.92x (?)

Code size: -Osize

Performance (x86_64): -Onone

Regression OLD NEW DELTA RATIO
NSError 720 802 +11.4% 0.90x (?)
ErrorHandling 3820 4140 +8.4% 0.92x (?)
StringBuilderLong 2050 2210 +7.8% 0.93x (?)
ObjectiveCBridgeStubFromNSString 1806 1942 +7.5% 0.93x (?)

Code size: -swiftlibs

How to read the data The 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
regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

@glessard
Copy link
Contributor Author

@swift-ci please test windows platform

Copy link
Member

@lorentey lorentey left a comment

Choose a reason for hiding this comment

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

What a weird way to spell a range 👍

@lorentey lorentey merged commit 6d2d2e0 into swiftlang:main Jun 10, 2022
@glessard glessard deleted the indexing-model branch June 10, 2022 19:04
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