Closed jkramarz closed 7 years ago
Review status: 0 of 1 files reviewed at latest revision, 2 unresolved discussions.
src/main/java/org/hashids/Hashids.java, line 386 at r1 (raw file):
long number = 0; for (char item: input.toCharArray()) {
Could you implement without calling toCharArray()
? Using charAt
is much more efficient. Despite that, code is good, nice catch.
src/main/java/org/hashids/Hashids.java, line 387 at r1 (raw file):
for (char item: input.toCharArray()) { long position = alphabet.indexOf(item);
Also, you could use the same pos
variable instead of declaring inside the loop. This would make minimal modifications to code.
Comments from Reviewable
Hi @jkramarz any news on the modifications? Would be a nice addition to the project.
Thanks!
I'll close as we changed directly in master. Thanks @jkramarz.
This change is![Reviewable](https://reviewable.io/review_button.svg)