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: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -400,6 +400,19 @@ The following charts compare JSON-AS (both SWAR and SIMD variants) against JavaS
400
400
401
401
> Note: I have focused on extensively optimizing serialization. I used to have deserialization be highly unsafe and extremely fast, but I've since doubled down on safety for deserialization which has negatively affected performance. I will be optimizing soon.
402
402
403
+
### Performance Tuning
404
+
405
+
Instead of using flags for setting options, `json-as` is configured by environmental variables.
406
+
Here's a short list:
407
+
408
+
**JSON_CACHE** (default: 0) - Enables caching costly strings based on hit frequency. May boost string serialization in excess of 22 GB/s.
409
+
410
+
**JSON_DEBUG** (default: 0) - Sets the debug level. May be within range `0-3`
411
+
412
+
**JSON_MODE** (default: SWAR) - Selects which mode should be used. Can be `NAIVE,SWAR,SIMD`. Note that `--enable simd` may be required.
413
+
414
+
**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`
415
+
403
416
### Running benchmarks locally
404
417
405
418
Benchmarks are run directly on top of v8 for more tailored control
0 commit comments