Skip to content

Commit fc750d1

Browse files
committed
chore: update readme
1 parent f92d292 commit fc750d1

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,19 @@ The following charts compare JSON-AS (both SWAR and SIMD variants) against JavaS
400400

401401
> 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.
402402
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+
403416
### Running benchmarks locally
404417

405418
Benchmarks are run directly on top of v8 for more tailored control

0 commit comments

Comments
 (0)