Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison with ObjectInputStream and ObjectOutputStream #1077

Closed
joel-schaal opened this issue May 6, 2024 · 2 comments
Closed

Comparison with ObjectInputStream and ObjectOutputStream #1077

joel-schaal opened this issue May 6, 2024 · 2 comments

Comments

@joel-schaal
Copy link

Since  ObjectInputStream  and ObjectOutputStream are both part of the JDK, I consider them like the default implementation we can use to perform Object (de)serialization.

I would therefore expect in the README.md some rationale on why Kryo is better than that implementation, and how does it compare in regards to performance.

Thanks!

@theigl
Copy link
Collaborator

theigl commented May 7, 2024

That makes a lot of sense.

In my experience, Kryo is 3-5x faster than JDK serialization when using the default FieldSerializer.
Performance gains are lower for the compatible serializers, but they offer more flexibility to evolve your data structures compared to JDK serialization.

A relatively straight forward option would be to add another benchmark to FieldSerializerBenchmark that uses default JDK serialization and re-generate the graphs.

This would be a good first issue for someone looking to contribute to Kryo.

@joel-schaal
Copy link
Author

Thanks for the answer, this is already helping me.
Since I'm in the process of reducing the amount of dependencies we have (and that's why I was looking into Kryo) I'm not really looking to contribute to Kryo for now. But I like the "here's how you could contribute" approach, This Is The Way™.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants