Commit b932035
perf: Avoid zero-fill in redis_key_prefix
redis_key_prefix used ecalloc to allocate the prefixed-key buffer, then
immediately overwrote the entire allocation with two memcpy calls. The
zero-fill was wasted work on every keyed argument when a prefix is set.
Use emalloc and write the single trailing NUL explicitly.1 parent ea8a867 commit b932035
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4483 | 4483 | | |
4484 | 4484 | | |
4485 | 4485 | | |
4486 | | - | |
| 4486 | + | |
4487 | 4487 | | |
4488 | 4488 | | |
| 4489 | + | |
4489 | 4490 | | |
4490 | 4491 | | |
4491 | 4492 | | |
| |||
0 commit comments