diff options
| author | chenzizhan <[email protected]> | 2024-02-22 10:29:40 +0800 |
|---|---|---|
| committer | chenzizhan <[email protected]> | 2024-02-22 10:29:40 +0800 |
| commit | 430968661fd17f16da68333365ce317e30a77dc8 (patch) | |
| tree | f004312c60a67e7159430eb69887010c52f5a33b /src | |
| parent | 0a5c5a1fc3d4a2913086ec53854a6b340d82830a (diff) | |
performance: memset calls from maximum length to the actual effective length(fix)v4.4.10
Diffstat (limited to 'src')
| -rw-r--r-- | src/tags/cell_manager.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tags/cell_manager.c b/src/tags/cell_manager.c index 410ca58..8ca7331 100644 --- a/src/tags/cell_manager.c +++ b/src/tags/cell_manager.c @@ -81,11 +81,11 @@ void tag_id_map_free(struct tag_id_map *head) void cell_manager_reset(struct cell_manager *pthis) { + memset(pthis->id_tag_array, 0, sizeof(struct tag_hash_key *) * (pthis->max_cell_id + 1)); pthis->next_cell_id = 0; pthis->max_cell_id = -1; pthis->current_cell_num = 0; - memset(pthis->id_tag_array, 0, sizeof(struct tag_hash_key *) * (pthis->max_cell_id + 1)); - + if (pthis->sampling_mode == SAMPLING_MODE_TOPK) { heavy_keeper_reset(pthis->topk_tag_id_map); return; |
