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

Embed hash value in hash type entry #1579

Draft
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

zuiderkwast
Copy link
Contributor

For a hash type key represented as a hash table, embed the field and value in one allocation when they together fit in the size of one cache line. For larger fields and values, another layout is used where the value is a separately allocated sds string.

This is a follow-up of #1502, where a field-value entry was created where the field is embedded and the value is a pointer to a separately allocated sds value.

Signed-off-by: Viktor Söderqvist <[email protected]>
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 88.46154% with 12 lines in your changes missing coverage. Please review.

Project coverage is 70.99%. Comparing base (2d0b8e3) to head (cfe180b).

Files with missing lines Patch % Lines
src/t_hash.c 88.34% 12 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1579      +/-   ##
============================================
+ Coverage     70.94%   70.99%   +0.04%     
============================================
  Files           121      121              
  Lines         65132    65212      +80     
============================================
+ Hits          46207    46296      +89     
+ Misses        18925    18916       -9     
Files with missing lines Coverage Δ
src/sds.c 86.87% <100.00%> (+0.18%) ⬆️
src/server.h 100.00% <ø> (ø)
src/t_hash.c 94.90% <88.34%> (-1.24%) ⬇️

... and 12 files with indirect coverage changes

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.

1 participant