• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 20061901270

09 Dec 2025 11:28AM UTC coverage: 87.568% (-0.02%) from 87.584%
20061901270

push

github

sergepetrenko
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

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.84
/src/box/lua/ctl.c


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc