Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Get rid of unnecessary string copies in the the keys() method #800

Merged

Conversation

AndreyTokmakov
Copy link
Contributor

Two small performance fixes for query_string class methods:

  1. std::vector<std::string> keys()
    Removed unnecessary string copies in the the keys() method
    according to the results of benchmarks, the performance of the method increased by 3x+ times

  2. Constructor: query_string(std::string params, bool url = true)
    Added deallocation of excessive allocated memory
    vector<T>::resize() - keeps vector capacity

  3. Couple of unit-tests has been added

@gittiver gittiver merged commit 1b6a4f4 into CrowCpp:master May 6, 2024
6 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants