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-9272] Potential invalid benchmarks (used to skip allocations) #51748

Closed
milseman mannequin opened this issue Nov 15, 2018 · 1 comment
Closed

[SR-9272] Potential invalid benchmarks (used to skip allocations) #51748

milseman mannequin opened this issue Nov 15, 2018 · 1 comment
Labels
standard library Area: Standard library umbrella

Comments

@milseman
Copy link
Mannequin

milseman mannequin commented Nov 15, 2018

Previous ID SR-9272
Radar None
Original Reporter @milseman
Type Sub-task
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Sub-task
Assignee None
Priority Medium

md5: b9900e5c108e58bcfd1b07d1c575141e

Parent-Task:

Issue Description:

For StringFromLongWholeSubstringGeneric and StringFromLongWholeSubstring, we spend more time now in `malloc` than the entire benchmark used to run in. It's possible that the old implementation was somehow getting constant folded away and the intended effects were not actually being measured.

We need to investigate further to make sure.

@milseman
Copy link
Mannequin Author

milseman mannequin commented Dec 6, 2018

Turns out 4.2 had a fast-path for when a Substring covers all of its backing storage. In that case, we just retain. Fixed in #21072

@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
standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

0 participants