You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Existing implementation of scorex.util.encode.Base58 is a potential performance bomb, especially encoding, which copy the whole string buffer for each new character (which is added at the beginning of the buffer). It essentially make the algorithm O(n^2) where n is the length of the resulting string.
Solution
avoid using foldLeft and functional abstractions.
put characters in ArrayBuilder[Char] and then move them to StringBuilder in reverse order.
The text was updated successfully, but these errors were encountered:
Can only be done after #27
Problem
Existing implementation of scorex.util.encode.Base58 is a potential performance bomb, especially encoding, which copy the whole string buffer for each new character (which is added at the beginning of the buffer). It essentially make the algorithm O(n^2) where n is the length of the resulting string.
Solution
The text was updated successfully, but these errors were encountered: