- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 24
Open
Description
As in, 5-30x slower than a somewhat optimized impl
Lowest hanging fruits:
- Replace Array with Uint8Array for intermediate representation.
 This will also fix issues like max Array length in Chrome limiting this lib to about 60 MiB
 See feat!: use Uint8Array in alphabet() and radix #50 and feat!: unite alphabet, join, padding #51
- Use TextEncoder where available instead of .charCodeAt, which will also simplify validation
- Use TextDecoder where available to convert from uint8arr of codepoints instead of string concatenation
 See perf: use TextDecoder for building strings when available #52
- perf: trust Uint8Array.fromBase64 to check non-whitespace chars #47
- ...
Here are benchmark results
Taken on an M3 on random ~5 KiB Uint8Arrays (except for base58/base58check, which are 20-40 bytes)
Note: Firefox native codepath being slower than js is reported
Metadata
Metadata
Assignees
Labels
No labels