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-9700] String(decoding:as:UTF8) fastpath doesn't work for Slice<UBP<UInt8> | URBP> #52140

Open
weissi opened this issue Jan 18, 2019 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. performance standard library Area: Standard library umbrella

Comments

@weissi
Copy link
Member

weissi commented Jan 18, 2019

Previous ID SR-9700
Radar None
Original Reporter @weissi
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug, Performance
Assignee None
Priority Medium

md5: a81ae8c6c8887f4d727950563b58beb9

Issue Description:

String(decoding: sequenceOfBytes, as: Unicode.UTF8.self)

has an important fast path for most things that are contiguous in memory, most notionly Unsafe(Mutable)(Raw)BufferPointer(<UInt8>). Unfortunately, their Slice types don't hit that fast path.

@belkadan
Copy link
Contributor

cc @milseman

@milseman
Copy link
Mannequin

milseman mannequin commented Jan 22, 2019

I think Johannes already fixed this, but #22028 might be a better approach as well

@weissi
Copy link
Member Author

weissi commented Jan 22, 2019

@milseman I fixed it for UM(R)BP but not for the slices, #22028 definitely sounds like a good idea!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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

2 participants