Replace CVECTOR_LOGARITHMIC_GROWTH with CVECTOR_LINEAR_GROWTH #77
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.
In my own usage and in the examples I can find with using this library, it is more common to want to use the logarithmic growth algorithm than the linear growth algorithm. This is also the default (or only option) with vector and dynamic array data structures that are available in other programming languages. Setting the logarithmic algorithm to the default will reduce the burden on library users to define a special value in each compilation unit they use the library, and reduce the risk that they will forget to define it and lose performance.
This change is backwards compatible with any existing programs that defined the CVECTOR_LOGARITHMIC_GROWTH value; their program will continue to operate as intended, and they can remove the definition if/when they want.
This change will modify the behavior of programs that did not define the CVECTOR_LOGARITHMIC_GROWTH value; they must update their program to define the new CVECTOR_LINEAR_GROWTH value instead. However, given the small size of this library, I suspect that most users vendor the code directly into their codebases and will therefore not see any unexpected behavior. This change will only effect those that manually update their repository.