Open cazacugmihai opened 6 years ago
Could you fix formatting, otherwise it's impossible to analyze the diff with so many changes. Thanks.
Also, if you could explain the performance improvements would help.
I have fixed the formatting.
The performance consists in:
String
;validChars
, guardsRegExp
, sepsRegExp
, regexp pattern) are precomputed and cached;StringBuilder buffer
, ret_strB
, StringBuilder hash
, etc.);CharUtils
) for working with char arrays.About the performance: I have gained about 100-200 ms for running all the tests (it is at least 20% more efficient).
Great, I'll take some time to review and get back to you. Thanks.
About breaking this pull request in smaller pieces: I can't do this because the most part of it is related to the migration from String
to char[]
. I may extract the constants and the validation method but it will not help much reviewing the code (because those changes are only a couple of lines).
@cazacugmihai what do you think about creating a branch and work on a new version? @gabrielhora you are invited to this discussion. I'll create an issue to work on that.
Sure, I can do that.
Issue 55 - V2 Proposal. Let's discuss there before starting to code.
This change is![Reviewable](https://reviewable.io/review_button.svg)