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

[SR-9896] Performance degradation in String.UTF8View.elementsEqual() between Swift 4.2 and Swift 5 toolchains #52302

Closed
swift-ci opened this issue Feb 10, 2019 · 5 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. performance standard library Area: Standard library umbrella

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-9896
Radar rdar://problem/47969205
Original Reporter twof (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Xcode 10.1
Swift 4.2 that ships with Xcode 10.1, and then Swift 5 Snapshot 2019-02-06
macOS 10.13.6

Additional Detail from JIRA
Votes 1
Component/s Standard Library
Labels Bug, Performance
Assignee @milseman
Priority Medium

Watchers: @shahmishal

md5: baaaf243346ace1f7b5b36486fc42887

Issue Description:

The following is the test being run. See result in attached screenshot.

@belkadan
Copy link
Contributor

cc @milseman

Do we have stdlib assertions turned on for development snapshot toolchains?

@milseman
Copy link
Mannequin

milseman mannequin commented Feb 11, 2019

That would be a better question for @shahmishal

@milseman
Copy link
Mannequin

milseman mannequin commented Feb 11, 2019

Regardless, I will look at this and also extend it a bit more. Some of the constant-costs in small string comparisons shifted around with the capability to store non-normalized content. I want to see if this is due to that and how salient it is in the context of other operations.

@shahmishal
Copy link
Member

We don't have stdlib assertions enabled because --no-swift-stdlib-assertions is set.

/Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/utils/build-script --ios --tvos --watchos --lldb --llbuild --swiftpm --swiftsyntax --skstresstester --swiftevolve --playgroundsupport --libcxx --indexstore-db --sourcekit-lsp --release-debuginfo --compiler-vendor=apple --lldb-no-debugserver --lldb-use-system-debugserver --lldb-build-type=Release --verbose-build --build-ninja --build-swift-static-stdlib --build-swift-static-sdk-overlay --build-swift-stdlib-unittest-extra --playgroundsupport-build-type=Release --install-swift --install-lldb --install-llbuild --install-swiftpm --install-swiftsyntax --skip-install-swiftsyntax-module --install-skstresstester --install-swiftevolve --install-playgroundsupport --install-destdir=/Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift-nightly-install --darwin-install-extract-symbols --install-symroot=/Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift-nightly-symroot --install-prefix=/Applications/Xcode.app/Contents/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2019-02-11-a.xctoolchain/usr --test-installable-package --reconfigure '--swift-install-components=compiler;clang-resource-dir-symlink;stdlib;sdk-overlay;parser-lib;license;sourcekit-xpc-service;swift-remote-mirror;swift-remote-mirror-headers' '--llvm-install-components=llvm-cov;llvm-profdata;IndexStore;clang;clang-headers;compiler-rt;clangd' --install-libcxx --installable-package=/Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift-DEVELOPMENT-SNAPSHOT-2019-02-11-a-osx.tar.gz --symbols-package=/Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift-DEVELOPMENT-SNAPSHOT-2019-02-11-a-osx-symbols.tar.gz --darwin-toolchain-bundle-identifier=org.swift.50201902111a '--darwin-toolchain-display-name=Swift Development Snapshot 2019-02-11 (a)' '--darwin-toolchain-display-name-short=Swift Development Snapshot' --darwin-toolchain-name=swift-DEVELOPMENT-SNAPSHOT-2019-02-11-a --darwin-toolchain-version=5.0.20190211101 --darwin-toolchain-alias=swift --build-subdir=buildbot_osx --ios --tvos --watchos --test --validation-test --long-test --stress-test --lldb-test-swift-only --installable-package=/Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift-DEVELOPMENT-SNAPSHOT-2019-02-11-a-osx.tar.gz --assertions --no-swift-stdlib-assertions --swift-enable-ast-verifier=0

@swift-ci
Copy link
Collaborator Author

Comment by Kyle Macomber (JIRA)

@Azoy has made many optimizations to string equality recently.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. performance standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

3 participants