Skip to content

Commit 67fc5e1

Browse files
committed
doc: readme
1 parent f80fc3c commit 67fc5e1

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

Performance.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22

33
All data in ops/sec
44

5+
Actual data in [https://docs.google.com/spreadsheets/d/1GnQYzrzEdF3Ea1hJUoEkEZEVNUI3ve8PKPFhLWcEoBI/edit?gid=0](spreadsheet)
6+
7+
A snapshot:
8+
59
![](./Performance.svg)

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
11
# `@exodus/bytes`
22

3-
`Uint8Array` conversion to and from `base64`, `base32`, `base58`, `hex`, and `utf8`
3+
`Uint8Array` conversion to and from `base64`, `base32`, `base58`, `hex`, `utf8`, `bech32` and `wif`
44

5-
[Fast](./Performance.md)
5+
Performs proper input validation, ensures no garbage-in-garbage-out
66

7-
Performs proper input validation
7+
Tested on Node.js, Deno, Bun, browsers, Hermes, and barebone engines in CI [(how?)](https://github.com/ExodusMovement/test#exodustest)
8+
9+
## Fast
10+
11+
* `10-20x` faster than `Buffer` polyfill
12+
* `2-10x` faster than `iconv-lite`
13+
14+
The above was for the js fallback
15+
16+
It's up to `100x` when native impl is available \
17+
e.g. in `utf8fromString` on Hermes / React Native or `fromHex` in Chrome
18+
19+
Also:
20+
* `3-8x` faster than `bs58`
21+
* `10-30x` faster than `@scure/base` (or `>100x` on Node.js <25)
22+
* Faster in `utf8toString` / `utf8fromString` than `Buffer` or `TextDecoder`/`TextEncoder` on Node.js
23+
24+
See [Performance](./Performance.md) for more info
825

926
## API
1027

0 commit comments

Comments
 (0)