-
Notifications
You must be signed in to change notification settings - Fork 632
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
Eliminate hashTypeIterator memory allocation by assigning it on stack #1105
Conversation
At redis/redis#11245, we provided dict iterator API to initialize/release the iterators without memory allocation. This change is for hash iterator. | test | unstable(ac569c0) rpc | this patch (rpc) | improvements | | ----------- | ------------------------- | ---------------- | ------------ | | HGETALL h1 | 78192.2 | 79802.09 | 2.058888227 | | HGETALL h10 | 75075.08 | 74850.3 | -0.29940694 | | HGETALL h25 | 68634.18 | 69541.03 | 1.321280447 | | HGETALL h50 | 60639.14 | 59548.62 | -1.798376428 | Signed-off-by: Masahiro Ide <masahiro.ide@lycorp.co.jp>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #1105 +/- ##
============================================
+ Coverage 70.57% 70.61% +0.04%
============================================
Files 114 114
Lines 61695 61711 +16
============================================
+ Hits 43544 43580 +36
+ Misses 18151 18131 -20
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech> Signed-off-by: Masahiro Ide <imasahiro9@gmail.com>
Signed-off-by: Masahiro Ide <masahiro.ide@lycorp.co.jp>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…valkey-io#1105) Signed-off-by: Masahiro Ide <masahiro.ide@lycorp.co.jp> Signed-off-by: Masahiro Ide <imasahiro9@gmail.com> Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech> Co-authored-by: Masahiro Ide <masahiro.ide@lycorp.co.jp> Signed-off-by: naglera <anagler123@gmail.com>
…valkey-io#1105) Signed-off-by: Masahiro Ide <masahiro.ide@lycorp.co.jp> Signed-off-by: Masahiro Ide <imasahiro9@gmail.com> Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech> Co-authored-by: Masahiro Ide <masahiro.ide@lycorp.co.jp>
…valkey-io#1105) Signed-off-by: Masahiro Ide <masahiro.ide@lycorp.co.jp> Signed-off-by: Masahiro Ide <imasahiro9@gmail.com> Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech> Co-authored-by: Masahiro Ide <masahiro.ide@lycorp.co.jp>
At redis/redis#11245, we provided dict iterator API to initialize/release the iterators without memory allocation. This change is for hash iterator.
The memory (de)allocation consumes 2.4% of cpu resource when we execute HGETALL command.
For big hashtable, the impact of this change is smaller but for small hashtable, it sometimes has a positive impact