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

perf: 3x to 10x improvement for string casing methods #20

Merged
merged 1 commit into from
Sep 22, 2019

Conversation

faustbrian
Copy link
Contributor

Summary

Increased the performance of various string methods from anywhere between 3x and 10x by using a different regular expression that covers most use-cases and use the String(...) method for the toString method.

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@ghost ghost added Complexity: Medium Less than 256 lines changed. Type: Performance The issue or pull request relates to performance. labels Sep 22, 2019
@codecov
Copy link

codecov bot commented Sep 22, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@46a368a). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##             master    #20   +/-   ##
=======================================
  Coverage          ?   100%           
=======================================
  Files             ?    108           
  Lines             ?    531           
  Branches          ?     36           
=======================================
  Hits              ?    531           
  Misses            ?      0           
  Partials          ?      0
Impacted Files Coverage Δ
src/internal/index.ts 100% <ø> (ø)
src/internal/compound-words.ts 100% <100%> (ø)
src/to-string.ts 100% <100%> (ø)
src/lower-case.ts 100% <100%> (ø)
src/at.ts 100% <100%> (ø)
src/to-upper.ts 100% <100%> (ø)
src/to-lower.ts 100% <100%> (ø)
src/words.ts 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46a368a...3348d75. Read the comment docs.

@faustbrian faustbrian merged commit 7c4997a into master Sep 22, 2019
@ghost ghost deleted the perf/strings branch September 22, 2019 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Medium Less than 256 lines changed. Type: Performance The issue or pull request relates to performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant