mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-31 15:22:16 +00:00
f336a89984
Customize Sha256Hash.hashCode() method to only use first n bytes of the backing array. This provides uniqueness to 256^n combinations. As hashcode is not required to be guaranteed unique this fulfills the contract and reduces hashing time. Use case is for applications that do a lot of mapping by Sha256Hash. Each put and get require several hashcode operations. Cached hashcode is already implemented in 8.patch. Similar changes to this yielded huge performance benefits in poolserverj. There is no point implementing a FastEquals version of equals given the bytes are essentially random and no byte is any more likely unique than another. |
||
---|---|---|
.. | ||
core | ||
discovery | ||
store |