Skip to content

Create benchmark for various forms of dictionaries#319

Merged
slozier merged 2 commits intoIronLanguages:mainfrom
BCSharp:benchmark_dictionary
Mar 31, 2026
Merged

Create benchmark for various forms of dictionaries#319
slozier merged 2 commits intoIronLanguages:mainfrom
BCSharp:benchmark_dictionary

Conversation

@BCSharp
Copy link
Copy Markdown
Member

@BCSharp BCSharp commented Mar 31, 2026

This PR is mainly done to test whether and when Hashtable in a single writer, multiple readers scenario is better than SynchronizedDictionary (#218).

Short answer: It isn't.

Longer answer: run the benchmarks yourself. The instructions are in README.md.

It looks like with every new version of .NET ComcurrentDictionary gets faster and faster. It already outpaced Hashtable. OTOH, the performance of Hashtable is static. Perhaps nobody is working on it anymore.

Copy link
Copy Markdown
Contributor

@slozier slozier left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good to me. I assume you meant ConcurrentDictionary and not SynchronizedDictionary in your comment.

I merged #320 already so this will probably generate an obsolete warning and break the build?

@BCSharp
Copy link
Copy Markdown
Member Author

BCSharp commented Mar 31, 2026

Correct on both points. I've already updated the comment.

@slozier slozier merged commit 96c4f47 into IronLanguages:main Mar 31, 2026
8 checks passed
@BCSharp BCSharp deleted the benchmark_dictionary branch March 31, 2026 20:59
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