You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9-16Lines changed: 9 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,22 +2,15 @@
2
2
3
3
## Unreleased
4
4
5
-
- feat: support broad `Map<K,V>` key round-trips by encoding non-string keys as quoted JSON key strings and decoding keys back through typed parse
6
-
- feat: allow `JSON.Value` to store and re-serialize built-in typed arrays and `ArrayBuffer`
7
-
- feat: let explicit `__SERIALIZE_CUSTOM` / `__DESERIALIZE_CUSTOM` hooks override built-in typed-array and `ArrayBuffer` handling while keeping generated hooks last
8
-
- feat: support optional JSON shape hints on `@serializer(...)` / `@deserializer(...)` decorators, defaulting to `any` and allowing nullable forms like `string | null`
9
-
- fix: preserve `bs` state across `JSON.internal.stringify(...)` and `JSON.internal.parse(...)`
10
-
- fix: make `JSON.Value` follow built-in subclass rules consistently for typed-array subclasses and custom `@json` subclasses
11
-
- fix: make generated custom serializer wrappers use the provided `ptr` so indirect-call sites like `JSON.Value` serialize correctly
12
-
- fix: stop preloading transform imports through `parser.parseFile(...)`, so repeated `asc()` calls in the same process no longer poison parser state or trip `lookupForeignFile` assertionsfect
13
-
- fix: stop naive string deserialization scratch allocations from growing across repeated large payload parses by using local `ensureSize(...)` scratch capacity instead of serialization-style proposed growth
14
-
- perf: reserve SIMD string serializer buffer growth once per hit block to reduce dense-escape overhead
15
-
- perf: raise the serialization buffer minimum size to 1024 bytes and add adaptive `bs.shrink()`
16
-
- perf: add a packed SWAR `u16_to_hex4_swar` helper for `\uXXXX` emission and use it across simple, SWAR, and SIMD string serializers
17
-
- perf: rewrite float serialization to Dragonbox per-width writers and share them across arrays, typed arrays, `JSON.Value`, and `JSON.stringify`
18
-
- perf: tune the Canada benchmark serialization pipeline with buffered estimates, delimiter helpers, and feature-segment concatenation to eliminate repeated `bs` growth
Copy file name to clipboardExpand all lines: README.md
+1-80Lines changed: 1 addition & 80 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -552,73 +552,6 @@ Here's a short list:
552
552
553
553
**JSON_WRITE** (default: "") - Select a series of files to output after transform and optimization passes have completed for easy inspection. Usage: `JSON_WRITE=.path-to-file-a.ts,./path-to-file-b.ts`
554
554
555
-
### Fast-Path Compatibility Matrix
556
-
557
-
Fast path applies to generated struct deserialization only (`JSON_USE_FAST_PATH=1`, `JSON_MODE=SWAR|SIMD`).
558
-
559
-
| Area | Status | Notes |
560
-
| --- | --- | --- |
561
-
|`JSON_MODE=NAIVE`| Not supported | Fast path is only emitted for `SWAR` / `SIMD`. |
562
-
| Canonical minified object layout | Required | No whitespace, canonical generated key order, no extra/missing keys. |
|`Array<T>`| Broad (`JSON.__serialize<valueof<T>>`) | Selective dispatch by element type | Deserialization supports primitives, nested arrays, `JSON.Value`, `JSON.Box`, `JSON.Obj`, `JSON.Raw`, `Date`, `Set`, `Map`, and `@json`/custom struct types. |
598
-
|`Map<K,V>`| Broad values and broad key types | Broad key types | Non-string keys are encoded as JSON text and then written as JSON object keys (quoted strings). Deserialization decodes key strings back with typed parsing. |
599
-
|`Set<T>`| Broad (`JSON.__serialize<indexof<T>>`) | Broad, element-scan + `JSON.__deserialize<indexof<T>>` for managed/reference types | Primitive element fast branches exist; managed/reference elements are delegated to generic typed deserialization. |
600
-
601
-
Container-type examples inferred from current code paths:
602
-
603
-
| Type | Serialize | Deserialize |
604
-
| --- | --- | --- |
605
-
|`Array<JSON.Raw>`| Yes | Yes |
606
-
|`Array<Map<string, i32>>`| Yes | Yes |
607
-
|`Array<Date>`| Yes | Yes |
608
-
|`Array<Set<string>>`| Yes | Yes |
609
-
|`Map<string, Date>`| Yes | Yes |
610
-
|`Map<bool, i32>`| Yes | Yes |
611
-
|`Map<Date, i32>`| Yes | Yes |
612
-
|`Map<@json class, i32>`| Yes | Yes |
613
-
|`Map<i32[], string>`| Yes | Yes |
614
-
|`Set<Date>`| Yes | Yes |
615
-
616
-
TODO (container coverage):
617
-
618
-
- decide and document whether array dispatch should also include typed-array/ArrayBuffer element types
619
-
- decide whether to keep broad `Map<K,V>` key support or provide a strict JSON-object-key mode (`string` only)
620
-
- add explicit tests for each matrix row above so support status is locked by CI
621
-
622
555
### Running Benchmarks Locally
623
556
624
557
Benchmarks are run directly on top of `v8` for tighter control over the engine configuration.
@@ -653,19 +586,7 @@ npm run bench:js
653
586
5. Build charts from the latest local logs:
654
587
655
588
```bash
656
-
npm run build:charts
657
-
```
658
-
659
-
6. Publish benchmark charts to the `docs` branch:
660
-
661
-
```bash
662
-
npm run bench:publish
663
-
```
664
-
665
-
If you already have fresh logs and only want to rebuild charts and push them:
0 commit comments