←back to thread

66 points chaokunyang | 3 comments | | HN request time: 0.001s | source

Serialization framework with some interesting numbers: 10-20x faster on nested objects than json/protobuf.

  Technical approach: compile-time codegen (no reflection), compact binary protocol with meta-packing, little-endian layout optimized for modern CPUs.

  Unique features that other fast serializers don't have:
  - Cross-language without IDL files (Rust ↔ Python/Java/Go)
  - Trait object serialization (Box<dyn Trait>)
  - Automatic circular reference handling
  - Schema evolution without coordination

  Happy to discuss design trade-offs.

  Benchmarks: https://fory.apache.org/docs/benchmarks/rust
1. jasonjmcghee ◴[] No.45738298[source]
Would love to see how it compares to Flatbuffers - was surprised to not see it in the benchmarks!
replies(1): >>45739680 #
2. jasonjmcghee ◴[] No.45739680[source]
Maybe I'm missing it, but they mention Flatbuffers a lot here, then don't show benchmarks:

https://fory.apache.org/blog/fury_blazing_fast_multiple_lang...

But flatbuffers is _much_ faster than protobuf/json:

https://flatbuffers.dev/benchmarks/

replies(1): >>45743010 #
3. chaokunyang ◴[] No.45743010[source]
In our Java benchmarks, Fory is actually faster than FlatBuffers — you can try it yourself here: https://github.com/apache/fory/blob/main/java/benchmark/src/...

We haven’t tested FlatBuffers vs. Fory for Rust yet, but we plan to.

It’s also worth noting the focus is a bit different: FlatBuffers is great for certain constrained scenarios (e.g., games, embedded), while Fory is a more general‑purpose serialization framework with features like cross‑language object graph support, circular reference handling, and schema evolution.