Skip to content

perf(crypto): memoize base58 de/encoding#3015

Merged
faustbrian merged 2 commits intodevelopfrom
perf/crypto/base58-memoization
Oct 3, 2019
Merged

perf(crypto): memoize base58 de/encoding#3015
faustbrian merged 2 commits intodevelopfrom
perf/crypto/base58-memoization

Conversation

@spkjp
Copy link
Copy Markdown
Contributor

@spkjp spkjp commented Oct 3, 2019

Summary

Memoize Base58 functions to speed up multipayment processing by up to 50%.

Before:
 ✓  Block.fromData (Multipayments 500 recipients) x 10.46 ops/sec ±1.14% (29 runs sampled)
After:
 ✓  Block.fromData (Multipayments 500 recipients) x 15.92 ops/sec ±3.32% (43 runs sampled)

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@faustbrian faustbrian merged commit b65a0e0 into develop Oct 3, 2019
@ghost ghost deleted the perf/crypto/base58-memoization branch October 3, 2019 05:53
};

export const Base58 = {
encodeCheck: moize(encodeCheck),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much data is this going to store in memory? There is no configuration or anything about that mentioned in https://www.npmjs.com/package/fast-memoize

vasild added a commit that referenced this pull request Oct 4, 2019
…ts-nonce

* ArkEcosystem/core/develop:
  refactor: remove `vendorFieldHex` (#3014)
  ci: run push events on master and develop, rest on PRs
  perf(crypto): memoize base58 de/encoding (#3015)
  refactor(core-transactions): bootstrap transactions in batches (#2997)
  perf(crypto): replace bignumber.js with native BigInt (#3010)
  refactor: add `round.missed` event (#3011)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants