Skip to content

[SR-6475] String needs a method to directly access either the ascii or unicode backing storage (compatible with cocoa storage too) #3780

Closed
@phausler

Description

@phausler
Previous ID SR-6475
Radar None
Original Reporter @phausler
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Foundation, Standard Library
Labels Bug
Assignee @milseman
Priority Medium

md5: 160572b7782ac20bbfdcd43f71047213

Issue Description:

This implementation of conversion from String to Data is in some cases 900x faster by taking advantage of fast paths. Ideally we should not drop performance like this on the floor and offer fast access to the appropriate backing storage. (note this is just a draft/toy version of what it should be but the concept should be implemented as API or SPI).

See the example at: https://gist.github.com/phausler/c6178bc9b0764f51d3ac182a293cede5

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions