Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(crypto): replace bs58check with bstring #2673

Merged
merged 2 commits into from Jun 8, 2019

Conversation

Projects
None yet
4 participants
@supaiku0
Copy link
Contributor

commented Jun 8, 2019

Replaces bs58check which is a pure JS implementation with bstring which ships a native base58 implemenation.

It is about twice as fast:

    ✓  bstring.base58.decode x 439,740 ops/sec ±1.76% (83 runs sampled)
    ✓  bs58check.decode x 223,122 ops/sec ±1.42% (82 runs sampled)
    ✓  bstring.base58.encode x 315,189 ops/sec ±1.10% (88 runs sampled)
    ✓  bs58check.encode x 162,822 ops/sec ±1.63% (92 runs sampled)

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactor
  • Performance
  • Tests
  • Build
  • Documentation
  • Code style update
  • Continuous Integration
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR release a new version?

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the develop branch, not the master branch
  • All tests are passing
  • New/updated tests are included

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

supaiku0 added some commits Jun 7, 2019

@codecov-io

This comment has been minimized.

Copy link

commented Jun 8, 2019

Codecov Report

Merging #2673 into 2.6 will increase coverage by 0.18%.
The diff coverage is 83.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##              2.6    #2673      +/-   ##
==========================================
+ Coverage   64.69%   64.88%   +0.18%     
==========================================
  Files         378      362      -16     
  Lines        8328     8201     -127     
  Branches      421      418       -3     
==========================================
- Hits         5388     5321      -67     
+ Misses       2899     2841      -58     
+ Partials       41       39       -2
Impacted Files Coverage Δ
packages/crypto/src/identities/address.ts 100% <100%> (ø) ⬆️
packages/crypto/src/transactions/types/transfer.ts 100% <100%> (ø) ⬆️
packages/crypto/src/transactions/serializer.ts 89.16% <100%> (-0.09%) ⬇️
packages/crypto/src/transactions/types/ipfs.ts 100% <100%> (ø) ⬆️
packages/crypto/src/crypto/bip38.ts 97.34% <100%> (-2.66%) ⬇️
...crypto/src/transactions/types/timelock-transfer.ts 42.85% <33.33%> (ø) ⬆️
packages/core-transactions/src/utils.ts 66.66% <50%> (-8.34%) ⬇️
...ges/crypto/src/transactions/types/multi-payment.ts 40.9% <50%> (ø) ⬆️
packages/core-api/src/formats.ts 44.44% <50%> (ø) ⬆️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1209a36...48600b3. Read the comment docs.

@faustbrian faustbrian merged commit 50ded58 into 2.6 Jun 8, 2019

15 checks passed

ci/circleci: node10-benchmark Your tests passed on CircleCI!
Details
ci/circleci: node10-e2e Your tests passed on CircleCI!
Details
ci/circleci: node10-functional Your tests passed on CircleCI!
Details
ci/circleci: node10-integration Your tests passed on CircleCI!
Details
ci/circleci: node10-unit Your tests passed on CircleCI!
Details
ci/circleci: node11-benchmark Your tests passed on CircleCI!
Details
ci/circleci: node11-e2e Your tests passed on CircleCI!
Details
ci/circleci: node11-functional Your tests passed on CircleCI!
Details
ci/circleci: node11-integration Your tests passed on CircleCI!
Details
ci/circleci: node11-unit Your tests passed on CircleCI!
Details
ci/circleci: node12-benchmark Your tests passed on CircleCI!
Details
ci/circleci: node12-e2e Your tests passed on CircleCI!
Details
ci/circleci: node12-functional Your tests passed on CircleCI!
Details
ci/circleci: node12-integration Your tests passed on CircleCI!
Details
ci/circleci: node12-unit Your tests passed on CircleCI!
Details

@ArkEcosystemBot ArkEcosystemBot deleted the perf/native-base58 branch Jun 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.