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

chore: reformat listpack according to valkey 8 #3810

Merged
merged 1 commit into from
Sep 27, 2024
Merged

chore: reformat listpack according to valkey 8 #3810

merged 1 commit into from
Sep 27, 2024

Conversation

romange
Copy link
Collaborator

@romange romange commented Sep 27, 2024

Also add benchmarks for lpCompare code when list contains integers.
No functional changes.

@romange romange requested a review from kostasrim September 27, 2024 08:43
Also add benchmarks for lpCompare code when list contains integers.

Signed-off-by: Roman Gershman <[email protected]>
@romange romange changed the title chore: reformat listpack chore: reformat listpack according to valkey 8 Sep 27, 2024
@@ -787,12 +773,12 @@ unsigned char *lpInsert(unsigned char *lp, const unsigned char *elestr, unsigned
unsigned char backlen[LP_MAX_BACKLEN_SIZE];

uint64_t enclen; /* The length of the encoded element. */
int delete = (elestr == NULL && eleint == NULL);
int del_ele = (elestr == NULL && eleint == NULL);
Copy link
Contributor

Choose a reason for hiding this comment

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

del_ete 🤣

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

🤷🏼

Comment on lines +736 to +740
std::random_device rd;
uint8_t* lp = lpNew(0);
for (unsigned i = 0; i < 100; ++i) {
lp = lpAppendInteger(lp, rd() % (1ULL << 48));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I was about to comment that is used below but IMO it's just a test and only a few lines so who cares

@romange romange enabled auto-merge (squash) September 27, 2024 09:07
@romange romange merged commit 8ae7141 into main Sep 27, 2024
12 checks passed
@romange romange deleted the Pr3 branch September 27, 2024 09:22
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