tracon-set.c grow_table(): Use MAX_TRACON_SET_TABLE_SIZE #1517
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a bug in
tracon-set.c
, existing there since I created it.The use of
MAX_STRING_SET_TABLE_SIZE
ingrow_table()
causes an inconsistent setting of the maximum loading factor, astracon_set_create()
andtracon_set_reset()
useMAX_TRACON_SET_TABLE_SIZE
and these definitions are now not the same.After this fix, the maximum load factor of the tracon-set is always 3/8, as specified in
tracon-set.h
(instring-set.h
andstring-id.h
it got set to 3/4 in commit 397a3d4). The run time doesn't noticeably improve, which may hint at a possible increase ofMAX_TRACON_SET_TABLE_SIZE
.The unintentional use of
MAX_STRING_SET_TABLE_SIZE
went unnoticed becausestring-set.h
is pulled intotracon-set.c
through the inclusion ofconnectors.h
. It would be better if internal module definitions were kept private and did not appear in internal API include files. So I propose to move the privatestring-set.c
definitions fromstring-set.h
tostring-set.c
, and the like for the other modules.(This line is for a backreference in issue #1487, in which I mentioned this PR.)