Skip to content

Conversation

JakubOnderka
Copy link
Owner

No description provided.

michael-grunder and others added 20 commits November 15, 2024 08:59
We know in advance the array size, so it makes sense to avoid reallocation when adding new elements. Also use immutable empty array in when we know in advance that redis will return zero elements.
From PHP 8, empty strings or string with one character don't need to be allocated. This change will reduce memory usage.
Initialize array with know size and reuse already allocated keys
This will slightly reduce memory usage for commands like RPUSH, LPUSH, SADD, SREM, etc
This will slightly reduce memory usage for HDEL command
This will slightly reduce memory usage for HSET command
Allocate output array to expected size and reuse already allocated string for output array keys
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