Skip to content
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

Try to avoid a realloc in utf8CString #73293

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Catfish-Man
Copy link
Member

No description provided.

@Catfish-Man Catfish-Man self-assigned this Apr 26, 2024
@Catfish-Man
Copy link
Member Author

@swift-ci please benchmark

@Catfish-Man
Copy link
Member Author

@swift-ci please Apple Silicon benchmark

@Catfish-Man
Copy link
Member Author

No >7%-threshold wins on AS, but x86 results look potentially nice

------- Performance (x86_64): -O -------

REGRESSION                                OLD       NEW       DELTA    RATIO    
ArrayAppendGenericStructs                 1360.0    1765.0    +29.8%   **0.77x (?)**
CharacterRecognizer.ascii                 92.353    113.412   +22.8%   **0.81x (?)**
SubstringEqualString                      156.273   177.833   +13.8%   **0.88x (?)**
StringComparison_slowerPrenormal          534.828   589.643   +10.2%   **0.91x (?)**
CStringShortAscii                         900.0     974.286   +8.3%    **0.92x (?)**

IMPROVEMENT                               OLD       NEW       DELTA    RATIO    
FlattenListFlatMap                        4167.0    2411.0    -42.1%   **1.73x (?)**
UTF8Decode_InitFromCustom_contiguous      177.455   144.385   -18.6%   **1.23x (?)**
LessSubstringSubstring                    29.512    24.057    -18.5%   **1.23x (?)**
EqualSubstringString                      29.606    24.184    -18.3%   **1.22x (?)**
LessSubstringSubstringGenericComparable   29.719    24.375    -18.0%   **1.22x (?)**
EqualSubstringSubstring                   29.839    24.481    -18.0%   **1.22x**
UTF8Decode_InitDecoding                   174.8     144.273   -17.5%   **1.21x**
UTF8Decode_InitFromData                   174.636   144.333   -17.4%   **1.21x**
UTF8Decode_InitFromBytes                  177.9     147.5     -17.1%   **1.21x (?)**
EqualStringSubstring                      29.607    24.583    -17.0%   **1.20x (?)**
EqualSubstringSubstringGenericEquatable   29.5      24.5      -16.9%   **1.20x (?)**
Data.hash.Medium                          28.103    24.258    -13.7%   **1.16x (?)**
StringComparison_longSharedPrefix         241.1     210.7     -12.6%   **1.14x (?)**
NormalizedIterator_fastPrenormal          538.605   473.0     -12.2%   **1.14x (?)**
Dictionary4OfObjects                      272.4     239.6     -12.0%   **1.14x (?)**
DropLastSequenceLazy                      330.667   296.857   -10.2%   **1.11x (?)**
DropLastSequence                          329.833   296.429   -10.1%   **1.11x (?)**
DistinctClassFieldAccesses                42.571    38.5      -9.6%    **1.11x (?)**
DropLastAnySequence                       328.833   297.857   -9.4%    **1.10x (?)**
AngryPhonebook.Strasse.Small              152.867   141.625   -7.4%    **1.08x (?)**

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.

None yet

1 participant