Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
bd6c4cad
Commit
bd6c4cad
authored
Sep 07, 2016
by
antirez
Browse files
dict.c benchmark: mixed del/insert benchmark.
parent
0f708ab2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dict.c
View file @
bd6c4cad
...
...
@@ -1173,5 +1173,16 @@ int main(int argc, char **argv) {
sdsfree
(
key
);
}
end_benchmark
(
"Accessing missing"
);
start_benchmark
();
for
(
j
=
0
;
j
<
count
;
j
++
)
{
sds
key
=
sdsfromlonglong
(
j
);
int
retval
=
dictDelete
(
dict
,
key
);
assert
(
retval
==
DICT_OK
);
key
[
0
]
+=
17
;
/* Change first number to letter. */
retval
=
dictAdd
(
dict
,
key
,(
void
*
)
j
);
assert
(
retval
==
DICT_OK
);
}
end_benchmark
(
"Removing and adding"
);
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment