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

Try sync.Map v2 #502

Closed
wants to merge 2 commits into from
Closed

Try sync.Map v2 #502

wants to merge 2 commits into from

Conversation

webmaster128
Copy link
Member

A re-created version of d7829b9 for #322.

This seems to work overall, but I am not impressed by the timing imporvements this brings:

Before (without sync.Map)

BenchmarkConcurrentIterators-10             1000          17665542 ns/op
BenchmarkConcurrentIterators-10             1000          17598419 ns/op
BenchmarkConcurrentIterators-10             1000          17232989 ns/op
BenchmarkConcurrentIterators-10             1000          17355900 ns/op

After (with sync.Map)

BenchmarkConcurrentIterators-10             1000          16104471 ns/op
BenchmarkConcurrentIterators-10             1000          16180791 ns/op

Maybe some more realistic use case is needed to better evaluate performance but those ~7% in this aggressively paralized test on 10 cores is not really convincing me.

@webmaster128 webmaster128 deleted the syncmap-v2 branch January 20, 2024 14:43
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.

1 participant