Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c199e3a
perf(rust): optimize signed varint encoding
chaokunyang May 7, 2026
7c68c04
bench: refresh non-java benchmark plots
chaokunyang May 7, 2026
002ffca
bench(python): adjust serializer plot order
chaokunyang May 7, 2026
94fbad7
bench(go): use normal plot title weight
chaokunyang May 7, 2026
406d75e
perf(js): batch generated varint32 field writes
chaokunyang May 7, 2026
03241de
perf(js): skip ref reset when disabled
chaokunyang May 7, 2026
30bea87
perf(js): speed up safe varint64 writes
chaokunyang May 7, 2026
f02f804
perf(js): speed up short string writes
chaokunyang May 7, 2026
5768d37
perf(js): speed up small typed array writes
chaokunyang May 7, 2026
66e2863
perf(js): bind non-empty string writer
chaokunyang May 7, 2026
72e454f
perf(js): cache root serialize closures
chaokunyang May 7, 2026
ae19f10
perf(go): specialize plain varint32 struct reads
chaokunyang May 7, 2026
280f30e
perf(go): skip ref preservation for no-ref struct reads
chaokunyang May 7, 2026
743c87d
perf(cpp): skip unused context reset work
chaokunyang May 7, 2026
2ddb002
perf(cpp): cache root struct type info
chaokunyang May 7, 2026
00a3cd1
perf(csharp): skip inactive write context resets
chaokunyang May 7, 2026
e235d94
perf(csharp): fast path empty strings
chaokunyang May 7, 2026
05d36a8
perf(csharp): inline small type meta indexes
chaokunyang May 7, 2026
5d3970e
bench(js): measure protobuf typed values
chaokunyang May 7, 2026
a14ff49
perf(js): cache last type meta header read
chaokunyang May 7, 2026
ee48ca8
perf(js): skip depth for flat root struct reads
chaokunyang May 7, 2026
bd599a2
perf(js): decode small varint64 before bigint conversion
chaokunyang May 7, 2026
7e823cb
perf(js): inline generated struct schema hash
chaokunyang May 7, 2026
10edfc1
perf(js): cache root deserialize closures
chaokunyang May 7, 2026
3b53f6a
fix(js): avoid retained compatible struct fallback
chaokunyang May 7, 2026
2628205
perf(js): construct pure numeric structs directly
chaokunyang May 7, 2026
8abfe3d
perf(js): cache compatible read schema variants
chaokunyang May 7, 2026
200ef6d
perf(java): add xlang benchmarks
chaokunyang May 7, 2026
419826d
perf(python): accelerate declared ndarray fields
chaokunyang May 7, 2026
bfcedd6
refactor(benchmarks): rename numeric struct payloads
chaokunyang May 7, 2026
40df8fe
perf(js): trim xlang deserialize hot paths
chaokunyang May 7, 2026
7bc18ed
docs(benchmarks): refresh python javascript reports
chaokunyang May 7, 2026
000df35
docs(benchmarks): refresh go xlang report
chaokunyang May 7, 2026
28823c2
docs(benchmarks): refresh rust xlang report
chaokunyang May 7, 2026
10cb760
docs(benchmarks): refresh cpp xlang report
chaokunyang May 7, 2026
63bccbb
docs(benchmarks): refresh csharp xlang report
chaokunyang May 7, 2026
bc3110f
docs(benchmarks): refresh dart xlang report
chaokunyang May 7, 2026
ef35fab
docs(benchmarks): refresh swift xlang report
chaokunyang May 7, 2026
621aa59
perf(js): optimize js deserialize perf
chaokunyang May 8, 2026
1383ca7
docs(js): clarify typemeta skip cache comment
chaokunyang May 8, 2026
4fca84a
docs(benchmarks): refresh java xlang report
chaokunyang May 8, 2026
42e1b76
docs: refresh python and javascript benchmarks
chaokunyang May 8, 2026
7273776
bench: use fixed int encoding for java xlang struct
chaokunyang May 8, 2026
68c7340
bench: use fixed protobuf numeric struct
chaokunyang May 8, 2026
985617a
ci: exclude generated xlang flatbuffer sources
chaokunyang May 8, 2026
70a3893
docs: refresh java benchmark plot
chaokunyang May 8, 2026
2976369
fix: reset csharp nested ref state
chaokunyang May 8, 2026
1253126
fix: handle javascript circular compatible refs
chaokunyang May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ examples/cpp/cmake_example/build
**/benchmark_results.json
**/benchmark_report.md
**/benchmark_*.png
benchmarks/java/reports/
**/results/
benchmarks/**/report/
**/ignored/**
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ Charts labeled **"compatible"** show schema evolution mode with forward/backward
<img src="docs/benchmarks/java/java_repo_deserialization_throughput.png" width="95%" alt="Java Deserialization Throughput">
</p>

**Xlang Throughput**:

<p align="center">
<img src="docs/benchmarks/java/throughput.png" width="95%">
</p>

See [Java Benchmarks](docs/benchmarks/java) for more details.

### Rust Serialization Performance
Expand Down
56 changes: 28 additions & 28 deletions benchmarks/cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ Note: Protobuf is fetched automatically via CMake FetchContent, so no manual ins

![Throughput](../../docs/benchmarks/cpp/throughput.png)

| Datatype | Operation | Fory TPS | Protobuf TPS | Faster |
| ------------ | ----------- | --------- | ------------ | ----------- |
| Mediacontent | Serialize | 2,254,915 | 504,410 | Fory (4.5x) |
| Mediacontent | Deserialize | 741,303 | 396,013 | Fory (1.9x) |
| Sample | Serialize | 4,248,973 | 3,229,102 | Fory (1.3x) |
| Sample | Deserialize | 935,709 | 715,837 | Fory (1.3x) |
| Struct | Serialize | 9,143,618 | 5,881,005 | Fory (1.6x) |
| Struct | Deserialize | 7,746,787 | 6,202,164 | Fory (1.2x) |
| Datatype | Operation | Fory TPS | Protobuf TPS | Faster |
| ------------- | ----------- | --------- | ------------ | ----------- |
| Mediacontent | Serialize | 2,254,915 | 504,410 | Fory (4.5x) |
| Mediacontent | Deserialize | 741,303 | 396,013 | Fory (1.9x) |
| Sample | Serialize | 4,248,973 | 3,229,102 | Fory (1.3x) |
| Sample | Deserialize | 935,709 | 715,837 | Fory (1.3x) |
| NumericStruct | Serialize | 9,143,618 | 5,881,005 | Fory (1.6x) |
| NumericStruct | Deserialize | 7,746,787 | 6,202,164 | Fory (1.2x) |

## Quick Start

Expand All @@ -60,7 +60,7 @@ Options:
Examples:

```bash
# Run only Struct benchmarks
# Run only NumericStruct benchmarks
./run.sh --data struct

# Run only Fory benchmarks
Expand Down Expand Up @@ -91,8 +91,8 @@ cmake --build . -j$(nproc)
### Filter specific benchmarks

```bash
# Run only Struct benchmarks
./fory_benchmark --benchmark_filter="Struct"
# Run only NumericStruct benchmarks
./fory_benchmark --benchmark_filter="NumericStruct"

# Run only Fory benchmarks
./fory_benchmark --benchmark_filter="Fory"
Expand All @@ -113,27 +113,27 @@ cmake --build . -j$(nproc)

## Benchmark Cases

| Benchmark | Description |
| -------------------------------------- | ------------------------------------------------------------------- |
| `BM_Fory_Struct_Serialize` | Serialize a simple struct with 8 int32 fields using Fory |
| `BM_Protobuf_Struct_Serialize` | Serialize the same struct using Protobuf |
| `BM_Fory_Struct_Deserialize` | Deserialize a simple struct using Fory |
| `BM_Protobuf_Struct_Deserialize` | Deserialize the same struct using Protobuf |
| `BM_Fory_Sample_Serialize` | Serialize a complex object with various types and arrays using Fory |
| `BM_Protobuf_Sample_Serialize` | Serialize the same object using Protobuf |
| `BM_Fory_Sample_Deserialize` | Deserialize a complex object using Fory |
| `BM_Protobuf_Sample_Deserialize` | Deserialize the same object using Protobuf |
| `BM_Fory_MediaContent_Serialize` | Serialize a complex object with Media and Images using Fory |
| `BM_Protobuf_MediaContent_Serialize` | Serialize the same object using Protobuf |
| `BM_Fory_MediaContent_Deserialize` | Deserialize a complex object with Media and Images using Fory |
| `BM_Protobuf_MediaContent_Deserialize` | Deserialize the same object using Protobuf |
| `BM_PrintSerializedSizes` | Just compares the serialization sizes of Fory and Protobuf |
| Benchmark | Description |
| --------------------------------------- | ------------------------------------------------------------------- |
| `BM_Fory_NumericStruct_Serialize` | Serialize a simple struct with 12 int32 fields using Fory |
| `BM_Protobuf_NumericStruct_Serialize` | Serialize the same struct using Protobuf |
| `BM_Fory_NumericStruct_Deserialize` | Deserialize a simple struct using Fory |
| `BM_Protobuf_NumericStruct_Deserialize` | Deserialize the same struct using Protobuf |
| `BM_Fory_Sample_Serialize` | Serialize a complex object with various types and arrays using Fory |
| `BM_Protobuf_Sample_Serialize` | Serialize the same object using Protobuf |
| `BM_Fory_Sample_Deserialize` | Deserialize a complex object using Fory |
| `BM_Protobuf_Sample_Deserialize` | Deserialize the same object using Protobuf |
| `BM_Fory_MediaContent_Serialize` | Serialize a complex object with Media and Images using Fory |
| `BM_Protobuf_MediaContent_Serialize` | Serialize the same object using Protobuf |
| `BM_Fory_MediaContent_Deserialize` | Deserialize a complex object with Media and Images using Fory |
| `BM_Protobuf_MediaContent_Deserialize` | Deserialize the same object using Protobuf |
| `BM_PrintSerializedSizes` | Just compares the serialization sizes of Fory and Protobuf |

## Data Structures

### Struct (Simple)
### NumericStruct (Simple)

A simple structure with 8 int32 fields, useful for measuring baseline serialization overhead.
A simple structure with 12 int32 fields, useful for measuring baseline serialization overhead.

### Sample (Complex)

Expand Down
Loading
Loading