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

More performance improvements #8993

Merged
merged 35 commits into from
Mar 24, 2023
Merged

More performance improvements #8993

merged 35 commits into from
Mar 24, 2023

Conversation

yawkat
Copy link
Member

@yawkat yawkat commented Mar 23, 2023

New changes from the last PR start at the merge commit.

Only big change is the introduction of a copy on write map, based on HashMap. It's slightly faster than ConcurrentHashMap for reading. I think it will be useful elsewhere too.

@dstepanov
Copy link
Contributor

We might want to check all of the concurrent instances we use

@yawkat
Copy link
Member Author

yawkat commented Mar 23, 2023

fwiw ConcurrentHashMap with a concurrency level of 1 (like in the benchmark) is very close in read perf compared to this new map, and it doesn't have the problem of being very inefficient to populate. so it may be a good choice for some other places like the conversion service. aiui, concurrencyLevel of 1 makes reads faster but concurrent writes slower.

@yawkat
Copy link
Member Author

yawkat commented Mar 24, 2023

oh i just realized concurrency level is 1 by default anyway :) so no improvement possible in that area.

@sonarcloud
Copy link

sonarcloud bot commented Mar 24, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

62.8% 62.8% Coverage
0.0% 0.0% Duplication

@graemerocher graemerocher merged commit aa98255 into 4.0.x Mar 24, 2023
@graemerocher graemerocher deleted the stack-benchmark branch March 24, 2023 14:07
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.

None yet

3 participants