cryptocoinjs / base-x

Encode/decode any base
MIT License
312 stars 75 forks source link

use Uint8Array as an encode argument #69

Closed Gozala closed 1 year ago

Gozala commented 4 years ago

This is slightly reduced in scope version of #68 which is not a breaking change for libraries downstream.

Before

Seed: 1e15efc4cbae18af002c915c6f93bb65
--------------------------------------------------
encode x 164,655 ops/sec ±27.37% (8 runs sampled)
decode x 229,892 ops/sec ±9.57% (8 runs sampled)
==================================================

After:

Seed: af0de9f733fe3e9bd1bdeb6f1330e6e2
--------------------------------------------------
encode x 241,838 ops/sec ±8.57% (9 runs sampled)
decode x 233,887 ops/sec ±4.73% (9 runs sampled)
==================================================