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

Improved type maximal sharing lookup #131

Merged
merged 10 commits into from
Dec 6, 2021

Conversation

DavyLandman
Copy link
Member

@DavyLandman DavyLandman commented Oct 9, 2021

Fixes #130.

This simplifies the code and makes it faster in the hot-path.

  1. Remove logic that tried to avoid locking while still being incorrect
  2. Avoid memory overhead for weakreference lookup for most recent values by keeping around a small map of hot items
  3. use Caffeine instead of code added on top of regular maps to simplify logic.

After finishing the migration to java 11, we can test out the performance gains of this change by making a new release of vallang.

Thanks @ben-manes for the discussion and the suggestions in issue #130.

@DavyLandman DavyLandman changed the title Improved type maximal sharing lookup (related to #130) Improved type maximal sharing lookup Oct 9, 2021
But do cleanup and demotion in the maintenance thread
@github-actions
Copy link

github-actions bot commented Dec 2, 2021

Unit Test Results

         31 files  ±0           31 suites  ±0   3m 45s ⏱️ +55s
227 506 tests ±0  227 505 ✔️ ±0  1 💤 ±0  0 ±0 

Results for commit 4c6fd00. ± Comparison against base commit fc8b74d.

♻️ This comment has been updated with latest results.

@DavyLandman DavyLandman marked this pull request as ready for review December 2, 2021 15:26
@jurgenvinju
Copy link
Member

ok; the code looks absolutely fine. The non-functional properties I have no idea how to gauge on short notice, so I'm deferring this to @DavyLandman ; we are promising ourselves to evaluate this design in terms of CPU efficiency, thread-safety and memory efficiency in the near future. I'll make an issue.

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.

Reduce allocations during WeakWriteLockingHashConsingMap::get
2 participants