Skip to content

[stdlib] Remove unneeded numericCasts #31653

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
May 9, 2020

Conversation

benrimmington
Copy link
Contributor

Follow-up to: SE-0191

@benrimmington
Copy link
Contributor Author

Cc: @airspeedswift

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

Thank you! If nothing else this would make it easier to type-check these expressions without use of a generic function :)

@CodaFi
Copy link
Contributor

CodaFi commented May 8, 2020

@swift-ci test

@CodaFi
Copy link
Contributor

CodaFi commented May 8, 2020

(Not that I expect fireworks here)

@swift-ci benchmark

@swift-ci
Copy link
Contributor

swift-ci commented May 8, 2020

Performance: -O

Regression OLD NEW DELTA RATIO
ArrayInitFromSlice 378 475 +25.7% 0.80x
String.data.LargeUnicode 112 132 +17.9% 0.85x (?)
ObjectiveCBridgeStubFromArrayOfNSString2 2970 3410 +14.8% 0.87x (?)
String.data.Medium 108 123 +13.9% 0.88x (?)
StringToDataLargeUnicode 3800 4250 +11.8% 0.89x (?)
SortStringsUnicode 2865 3110 +8.6% 0.92x
 
Improvement OLD NEW DELTA RATIO
UTF8Decode_InitFromBytes_ascii 338 295 -12.7% 1.15x (?)
Data.hash.Empty 77 71 -7.8% 1.08x (?)
StringHashing_fastPrenormal 1000 930 -7.0% 1.08x
NSStringConversion.MutableCopy.UTF8 868 810 -6.7% 1.07x (?)

Code size: -O

Regression OLD NEW DELTA RATIO
AngryPhonebook.o 10038 10147 +1.1% 0.99x

Performance: -Osize

Regression OLD NEW DELTA RATIO
ArrayInitFromSlice 379 470 +24.0% 0.81x
SortStringsUnicode 2930 3180 +8.5% 0.92x (?)
DataAccessBytesMedium 94 102 +8.5% 0.92x (?)
 
Improvement OLD NEW DELTA RATIO
FlattenListFlatMap 7711 5852 -24.1% 1.32x (?)
FlattenListLoop 5562 4718 -15.2% 1.18x (?)
DictionaryOfAnyHashableStrings_insert 5670 4858 -14.3% 1.17x
UTF8Decode_InitFromBytes_ascii 340 296 -12.9% 1.15x (?)
DictionaryOfAnyHashableStrings_lookup 4368 3936 -9.9% 1.11x
Data.hash.Empty 74 68 -8.1% 1.09x (?)
StringHashing_fastPrenormal 1010 930 -7.9% 1.09x
UTF8Decode_InitFromBytes_ascii_as_ascii 485 453 -6.6% 1.07x (?)

Code size: -Osize

Regression OLD NEW DELTA RATIO
AngryPhonebook.o 9497 9609 +1.2% 0.99x

Performance: -Onone

Regression OLD NEW DELTA RATIO
ArrayInitFromSlice 431 539 +25.1% 0.80x (?)
NSStringConversion.UTF8 2141 2478 +15.7% 0.86x (?)
NSStringConversion.Mutable 2431 2799 +15.1% 0.87x (?)
ObjectiveCBridgeToNSSet 16350 18050 +10.4% 0.91x (?)
CharIndexing_korean_unicodeScalars_Backwards 611160 665520 +8.9% 0.92x (?)
StringToDataLargeUnicode 4550 4950 +8.8% 0.92x (?)
CharIndexing_chinese_unicodeScalars_Backwards 472760 513160 +8.5% 0.92x (?)
EqualSubstringString 48 52 +8.3% 0.92x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 106640 115440 +8.3% 0.92x (?)
Dictionary4OfObjectsLegacy 1642 1775 +8.1% 0.93x (?)
ObjectiveCBridgeStubToNSDate2 620 670 +8.1% 0.93x (?)
String.data.LargeUnicode 131 141 +7.6% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
UTF8Decode_InitFromBytes_ascii 352 309 -12.2% 1.14x (?)
StringBuilderWithLongSubstring 3050 2680 -12.1% 1.14x (?)
DictionaryOfAnyHashableStrings_insert 7882 6958 -11.7% 1.13x (?)
StringRemoveDupes 930 832 -10.5% 1.12x
DictionaryOfAnyHashableStrings_lookup 5064 4584 -9.5% 1.10x (?)
ArrayOfPOD 1118 1035 -7.4% 1.08x (?)
Combos 1482 1383 -6.7% 1.07x (?)

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

@CodaFi
Copy link
Contributor

CodaFi commented May 8, 2020

Yup, all noise.

@CodaFi
Copy link
Contributor

CodaFi commented May 9, 2020

Thanks!

⛵️

@CodaFi CodaFi merged commit 37657d0 into swiftlang:master May 9, 2020
@benrimmington benrimmington deleted the se-0191-numeric-cast branch May 10, 2020 07:36
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.

4 participants