Skip to content

Commit d5af690

Browse files
committed
doc: perf updates
1 parent 815cb6c commit d5af690

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,29 @@ See [Performance](./Performance.md) for more info
3333
import { TextDecoder, TextEncoder } from '@exodus/bytes/encoding.js'
3434
```
3535

36-
Less than half the bundle size of [text-encoding](https://npmjs.com/text-encoding), [whatwg-encoding](https://npmjs.com/whatwg-encoding) or [iconv-lite](https://npmjs.com/iconv-lite) (gzipped or not), and [is much faster](#fast).
37-
See also [lite version](#lite-version).
36+
Less than half the bundle size of [text-encoding](https://npmjs.com/text-encoding), [whatwg-encoding](https://npmjs.com/whatwg-encoding) or [iconv-lite](https://npmjs.com/iconv-lite) (gzipped or not).\
37+
Also [much faster](#fast) than all of those.
3838

39-
Spec compliant, passing WPT and covered with extra tests.
39+
> [!TIP]
40+
> See also the [lite version](#lite-version) to get this down to 9 KiB gzipped.
4041
41-
Moreover, tests for this library uncovered [bugs in all major implementations](https://docs.google.com/spreadsheets/d/1pdEefRG6r9fZy61WHGz0TKSt8cO4ISWqlpBN5KntIvQ/edit).
42+
Spec compliant, passing WPT and covered with extra tests.\
43+
Moreover, tests for this library uncovered [bugs in all major implementations](https://docs.google.com/spreadsheets/d/1pdEefRG6r9fZy61WHGz0TKSt8cO4ISWqlpBN5KntIvQ/edit).\
44+
See [WPT pull request](https://github.com/web-platform-tests/wpt/pull/56892).
4245

43-
[Faster than Node.js native implementation on Node.js](https://github.com/nodejs/node/issues/61041#issuecomment-3649242024).
46+
It works correctly even in environments that have native implementations broken (that's all environments currently).\
4447
Runs (and passes WPT) on Node.js built without ICU.
4548

49+
> [!NOTE]
50+
> [Faster than Node.js native implementation on Node.js](https://github.com/nodejs/node/issues/61041#issuecomment-3649242024).
51+
>
52+
> The JS multi-byte version is as fast as native impl in Node.js and browsers, but (unlike them) returns correct results.
53+
>
54+
> For encodings where native version is known to be fast and correct, it is automatically used.\
55+
> Some single-byte encodings are faster than native in all three major browser engines.
56+
57+
See [analysis table](https://docs.google.com/spreadsheets/d/1pdEefRG6r9fZy61WHGz0TKSt8cO4ISWqlpBN5KntIvQ/edit) for more info.
58+
4659
### Caveat: `TextDecoder` / `TextEncoder` APIs are lossy by default per spec
4760

4861
_These are only provided as a compatibility layer, prefer hardened APIs instead in new code._

0 commit comments

Comments
 (0)