williamfiset / Algorithms

A collection of algorithms and data structures
MIT License
17.18k stars 4.34k forks source link

Optimizing Uses of BigInteger #396

Closed syoon2 closed 1 year ago

syoon2 commented 1 year ago

In various places that java.math.BigInteger instances are used, the string constructor is invoked. This PR replaces these with java.math.BigInteger.valueOf(long) method calls for optimization - removing overhead from string parsing.