Skip to content

Conversation

@chaokunyang
Copy link
Collaborator

@chaokunyang chaokunyang commented Dec 2, 2025

What does this PR do?

directly error set instead of result to reduce cost on hotpath for buffer read, so we can remove Result cost.

Related issues

#2958

Does this PR introduce any user-facing change?

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

Before this PR:

Datatype Operation Fory (ns) Protobuf (ns) Faster
Struct Serialize 10.7 19.8 Fory (1.9x)
Struct Deserialize 53.7 16.2 Protobuf (3.3x)

With this PR:

Datatype Operation Fory (ns) Protobuf (ns) Faster
Struct Serialize 10.3 19.8 Fory (1.9x)
Struct Deserialize 33.6 16.5 Protobuf (2.0x)

@chaokunyang chaokunyang mentioned this pull request Dec 2, 2025
17 tasks
@chaokunyang chaokunyang changed the title perf(c++): directly error set instead of result to reduce cost on hotpath for bu… perf(c++): directly error set instead of result to reduce cost on hotpath Dec 2, 2025
@chaokunyang chaokunyang requested a review from urlyy December 2, 2025 04:02
@chaokunyang chaokunyang merged commit 8181e14 into apache:main Dec 2, 2025
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants