Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

length_count: use Vec::with_capacity #87

Merged
merged 1 commit into from
Jan 27, 2023
Merged

length_count: use Vec::with_capacity #87

merged 1 commit into from
Jan 27, 2023

Conversation

epage
Copy link
Collaborator

@epage epage commented Jan 27, 2023

This change avoids reallocation while filling in the array. In my case this causes a ~20% perf increase.

See rust-bakery/nom#1462

This change avoids reallocation while filling in the array. In my case
this causes a ~20% perf increase.
@coveralls
Copy link

coveralls commented Jan 27, 2023

Pull Request Test Coverage Report for Build 4020567011

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage remained the same at 51.182%

Files with Coverage Reduction New Missed Lines %
src/character/complete.rs 1 79.58%
Totals Coverage Status
Change from base Build 4020535477: 0.0%
Covered Lines: 1754
Relevant Lines: 3427

💛 - Coveralls

@epage epage merged commit b9de8b3 into winnow-rs:main Jan 27, 2023
@epage epage deleted the length branch January 27, 2023 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants