feross / feross/buffer

Faster `toString('hex')` implementation

Open
#364 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.9k
Forks
260
PR merge metrics
No merged PRs in 30d

Description

In a similar vein to #245, I have an implementation of `toString('hex')` that's between 2x and 4x faster than the existing one, depending on the browser/engine.

See: https://jsbench.me/evm3ejel2i/3

Possible drawbacks of this implementation:

* Requires `TextDecoder` (does this package support IE currently?)
* Likely uses more memory, since it allocates a `Uint16Array` to hold intermediate data

Would you accept a PR to switch to this implementation?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.