Skip to main content
Version: dev

JavaScript Benchmark Performance Report

Generated on 2026-05-08 17:55:12

How to Generate This Report

cd benchmarks/javascript
./run.sh

Benchmark Semantics

The timed serializer loops use serializer-native typed values. Fory receives the pre-normalized Fory value used by its schema, protobuf receives the prebuilt protobuf-shaped value, and JSON receives the benchmark JavaScript object. Protobuf timings do not include toProto, fromProto, protobufjs.create, or toObject conversion work.

Benchmark Plot

The plot shows throughput (ops/sec); higher is better.

Throughput

Hardware & OS Info

KeyValue
OSDarwin 24.6.0
Machinearm64
Processorarm
CPU Cores (Physical)12
CPU Cores (Logical)12
Total RAM (GB)48.0
Benchmark Date2026-05-08T08:07:36.073Z
CPU Cores (from benchmark)12
Node.jsv22.20.0
V812.4.254.21-node.33

Benchmark Results

Timing Results (nanoseconds)

DatatypeOperationfory (ns)protobuf (ns)json (ns)Fastest
NumericStructSerialize76.0613.0496.0fory
NumericStructDeserialize56.994.8333.0fory
SampleSerialize318.02016.61409.3fory
SampleDeserialize496.0902.51609.6fory
MediaContentSerialize494.11358.5803.5fory
MediaContentDeserialize539.3628.31134.3fory
NumericStructListSerialize195.33019.32013.5fory
NumericStructListDeserialize183.7606.91944.0fory
SampleListSerialize1681.919346.711870.3fory
SampleListDeserialize2571.95730.69074.5fory
MediaContentListSerialize2785.97616.63611.5fory
MediaContentListDeserialize3709.73018.65294.5protobuf

Throughput Results (ops/sec)

DatatypeOperationfory TPSprotobuf TPSjson TPSFastest
NumericStructSerialize13,162,4661,631,2712,016,097fory
NumericStructDeserialize17,568,41810,543,7633,002,971fory
SampleSerialize3,144,194495,893709,593fory
SampleDeserialize2,015,9421,108,010621,285fory
MediaContentSerialize2,023,719736,0971,244,512fory
MediaContentDeserialize1,854,3481,591,617881,572fory
NumericStructListSerialize5,121,376331,201496,645fory
NumericStructListDeserialize5,444,5041,647,728514,414fory
SampleListSerialize594,55151,68884,244fory
SampleListDeserialize388,820174,503110,199fory
MediaContentListSerialize358,954131,293276,891fory
MediaContentListDeserialize269,561331,275188,876protobuf

Serialized Data Sizes (bytes)

Datatypeforyprotobufjson
NumericStruct7893159
Sample445377724
MediaContent388307596
NumericStructList255475817
SampleList197819003642
MediaContentList166115503009