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

use hashbrown to speedup python string caching #43

Closed
wants to merge 1 commit into from

Conversation

samuelcolvin
Copy link
Member

targets the dh/py2 branch to avoid future conflicts.

RawEntryMut::Occupied(view) => (view.get().clone_ref(py).attach_into(py), false),
};
if inserted {
// 500k limit means 1m keys + values, 1m 64 byte strings is ~64mb
Copy link
Member Author

Choose a reason for hiding this comment

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

better I think do only do this if we inserted a key rather than always, even if that means clearing the key we just inserted.

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Merging #43 (5944b31) into dh/py2 (d98f5ed) will decrease coverage by 0.08%.
The diff coverage is 86.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##           dh/py2      #43      +/-   ##
==========================================
- Coverage   89.53%   89.46%   -0.08%     
==========================================
  Files           9        9              
  Lines        1061     1063       +2     
==========================================
+ Hits          950      951       +1     
- Misses        111      112       +1     
Files Coverage Δ
src/python.rs 94.91% <86.66%> (-0.78%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d98f5ed...5944b31. Read the comment docs.

Copy link

codspeed-hq bot commented Nov 30, 2023

CodSpeed Performance Report

Merging #43 will not alter performance

Comparing py2-hashbrown2 (5944b31) with dh/py2 (d98f5ed)

Summary

✅ 37 untouched benchmarks

🆕 2 new benchmarks

Benchmarks breakdown

Benchmark dh/py2 py2-hashbrown2 Change
🆕 python_parse_string_array_unique_not_cached N/A 22.8 ms N/A
🆕 python_parse_string_array_unique N/A 10.6 ms N/A

@davidhewitt
Copy link
Collaborator

Superseded by #51

@davidhewitt davidhewitt closed this Dec 4, 2023
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

2 participants