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

Add parallel iterators for map.keys and map.values #26519

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jabraham17
Copy link
Member

@jabraham17 jabraham17 commented Jan 14, 2025

Adds the missing parallel iterators for map.keys() and map.values().

Resolves #24056

  • Tested with a full paratest with/without gasnet

Implementation note: this implements the parallel iterators nearly identically to the ones for set.these()

[Reviewed by @lydia-duncan]

@cassella
Copy link
Contributor

cassella commented Feb 6, 2025

Implementation note: this implements the parallel iterators nearly identically to the ones for set.these()

It doesn't look nearly identical to me, maybe because of the changes to set.these() in #26595. (I think these these() will have the same issue those these() had prior to that PR.)

@jabraham17
Copy link
Member Author

That is correct, this PR predates that work and has not been updated to match yet

@jabraham17 jabraham17 self-assigned this Feb 6, 2025
@cassella
Copy link
Contributor

cassella commented Feb 7, 2025

Sure. I was just making a note since github repored that it wasn't going to cause a merge conflict; the pr description is now stale; and the state of the art in set.these() has advanced.

Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
@lydia-duncan lydia-duncan self-requested a review February 14, 2025 19:37
Copy link
Member

@lydia-duncan lydia-duncan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, that looks good! To verify it's working the same as the Set improvement, it'd be nice to see:

  • A test of zippering the keys of one map with the keys of a separate map of the same length (and/or the same thing but with values)
  • A test of zippering either the keys or the values of a map with a set of the same length.

But I have no reason to believe those cases don't work today, since they're benefiting from the same code as Set.

Signed-off-by: Jade Abraham <[email protected]>
Copy link
Member

@lydia-duncan lydia-duncan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Map.keys() and .values() parallel iterators?
3 participants