Skip to content

use hashbrown to speedup python string caching#43

Closed
samuelcolvin wants to merge 1 commit intodh/py2from
py2-hashbrown2
Closed

use hashbrown to speedup python string caching#43
samuelcolvin wants to merge 1 commit intodh/py2from
py2-hashbrown2

Conversation

@samuelcolvin
Copy link
Copy Markdown
Member

targets the dh/py2 branch to avoid future conflicts.

Comment thread src/python.rs
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
Copy Markdown
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.

@codecov
Copy link
Copy Markdown

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.

@codspeed-hq
Copy link
Copy Markdown

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
Copy Markdown
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.

2 participants