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-12364] Need concurrentPerform that exposes batch offset and size #3264

Open
dabrahams opened this issue Mar 13, 2020 · 2 comments
Open

Comments

@dabrahams
Copy link

Previous ID SR-12364
Radar rdar://problem/60832811
Original Reporter @dabrahams
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: 5c92ddb2adf59b6da81900ddbca0629b

Issue Description:

As noted here, for an operation like concurrentMap to be efficient, it is forced to explicitly choose a batch size instead of letting Dispatch divide the work up intelligently. That could be solved if there was a concurrentPerform whose closure took a batch start offset and length.

Dispatch could even adaptively adjust batch sizes as it observes the performance of the closure—assuming we can figure out how to do that 😉

@beccadax
Copy link
Contributor

@swift-ci create

@dabrahams
Copy link
Author

A great design would also account for the ability to make adjustments for cache line size like what @stephentyrone mentions here.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants