yomorun / hashids-java

Hashids algorithm v1.0.0 implementation in Java
http://hashids.org
MIT License
1.02k stars 156 forks source link

Fix performance issue #37. #38

Closed lichtsinn closed 7 years ago

lichtsinn commented 7 years ago

Code changes should improve performance quite a bit.


This change is Reviewable

0x3333 commented 7 years ago

Asked for just a small change. Nice catch!


Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.


src/main/java/org/hashids/Hashids.java, line 356 at r1 (raw file):


    int asc_val, j;
    char[] tmp_arr = alphabet.toCharArray();

Could you change tmp_arr to tmpArr.


Comments from Reviewable

0x3333 commented 7 years ago

Reviewed 1 of 1 files at r1. Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

0x3333 commented 7 years ago

Reviewed 1 of 1 files at r2. Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

0x3333 commented 7 years ago

Great. I'll merge it asap... I'm on the go...

Thanks for the patch!

lichtsinn commented 7 years ago

Still 'on the go...'?

0x3333 commented 7 years ago

Sorry for the delay, just got to the office today!