push
github
tuple: remove useless loop from `tuple_dictionary_delete_hash` Inside `tuple_dictionary_delete_hash`, there was a loop that, on each iteration, searched for the first non-deleted element using `mh_first`, which has a complexity of `O(n)`, and deleted it using `mh_strnu32_del`. After the loop finished executing, `tuple_dictionary_delete_hash` immediately called `mh_strnu32_delete`. All elements are stored in the hashmap inplace, so `del` doesn't invoke any memory deallocation functions. `del` also doesn't call destructors for the elements; it merely sets a specific bit in the bitmap to 0. Immediately after the loop, `mh_strnu32_delete(hash)` will delete the hashmap `hash` along with the array `hash->p` containing all elements inplace. This commit simply removes this useless loop, which was causing significant performance issues when closing a read view. Closes tarantool/tarantool-ee#1043, #12115 NO_DOC=performance improvement NO_TEST=performance improvement (cherry picked from commit 4b720077b)
68787 of 116384 branches covered (59.1%)
103519 of 118215 relevant lines covered (87.57%)
1628412.63 hits per line