-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Use bytearray.take_bytes to speed up asyncio.streams #141863
Copy link
Copy link
Closed
Labels
performancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-asynciotype-featureA feature request or enhancementA feature request or enhancement
Description
Activity
Metadata
Metadata
Assignees
Labels
performancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-asynciotype-featureA feature request or enhancementA feature request or enhancement
Projects
- StatusShow more project fieldsDone
Feature or enhancement
Proposal:
Multiple codepaths in
asyncio.streamsoperate onself._buffer(a bytearray) and then "take" (copy and delete bytes from original) when returning or passing them to other functions. That code pattern can be optimized with.take_bytes()added in gh-139871Pyperformance:
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs