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

Implement efficient map iter, fix test bug #1

Merged
merged 1 commit into from
May 2, 2022
Merged

Conversation

fhackett
Copy link
Collaborator

@fhackett fhackett commented May 2, 2022

Map iteration now uses the reflect package to avoid the alternatives of allocating potentially large slices of keys or strange goroutine trickery which we discussed IRL.

There were iterator tests already, so I kept them as-is.

I did notice a strange test failure due to iterator objects getting re-used across two separate tests, so I fixed that by thunking iterator instantiation, wrapping the iterator construction in parameterless functions.

@fhackett fhackett requested a review from shayanh May 2, 2022 23:36
@shayanh shayanh merged commit fd66ace into shayanh:main May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants