Skip to content

IRGen: Use known value witnesses in generic metadata patterns. #26584

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

Conversation

jckarter
Copy link
Contributor

@jckarter jckarter commented Aug 9, 2019

We were unnecessarily conservative here; generic metadata patterns support indirectable references
to value witness tables exported by the standard library, so if we have a fixed-layout generic
type that matches a known value witness table layout, use that instead of generating a new
value witness table.

We were unnecessarily conservative here; generic metadata patterns support indirectable references
to value witness tables exported by the standard library, so if we have a fixed-layout generic
type that matches a known value witness table layout, use that instead of generating a new
value witness table.
@jckarter
Copy link
Contributor Author

jckarter commented Aug 9, 2019

@swift-ci Please benchmark

@jckarter
Copy link
Contributor Author

jckarter commented Aug 9, 2019

@swift-ci Please test

@jckarter
Copy link
Contributor Author

jckarter commented Aug 9, 2019

@swift-ci Please test Windows

@swift-ci
Copy link
Contributor

swift-ci commented Aug 9, 2019

Performance: -O

Regression OLD NEW DELTA RATIO
FlattenListFlatMap 3938 4567 +16.0% 0.86x (?)
Set.isDisjoint.Seq.Empty.Box 78 89 +14.1% 0.88x (?)
Set.subtracting.Empty.Box 8 9 +12.5% 0.89x (?)
Set.isDisjoint.Seq.Box.Empty 68 75 +10.3% 0.91x
RemoveWhereFilterInts 23 25 +8.7% 0.92x (?)
SuffixSequence 289 314 +8.7% 0.92x (?)
SuffixSequenceLazy 289 314 +8.7% 0.92x
UTF8Decode_InitDecoding 105 114 +8.6% 0.92x (?)
Set.isStrictSubset.Seq.Int.Empty 119 129 +8.4% 0.92x (?)
Set.isSubset.Seq.Int.Empty 118 127 +7.6% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
CharIndexing_punctuated_unicodeScalars_Backwards 800 720 -10.0% 1.11x (?)
NormalizedIterator_fastPrenormal 640 590 -7.8% 1.08x (?)

Code size: -O

Performance: -Osize

Regression OLD NEW DELTA RATIO
FlattenListLoop 2168 2748 +26.8% 0.79x (?)
Set.isStrictSuperset.Seq.Empty.Int 169 183 +8.3% 0.92x (?)
 
Improvement OLD NEW DELTA RATIO
RemoveWhereMoveInts 21 18 -14.3% 1.17x
DistinctClassFieldAccesses 195 180 -7.7% 1.08x (?)
NSStringConversion.Long 525 490 -6.7% 1.07x (?)

Code size: -Osize

Performance: -Onone

Regression OLD NEW DELTA RATIO
ArrayOfGenericPOD2 713 834 +17.0% 0.85x (?)
UTF8Decode_InitDecoding 126 138 +9.5% 0.91x (?)

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 mini
  Model Identifier: Macmini8,1
  Processor Name: Intel Core i7
  Processor Speed: 3.2 GHz
  Number of Processors: 1
  Total Number of Cores: 6
  L2 Cache (per Core): 256 KB
  L3 Cache: 12 MB
  Memory: 64 GB

@jckarter jckarter merged commit befffd9 into swiftlang:master Aug 9, 2019
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