-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Benchmark data table serialization logic and pre-allocate byte[] array if need be #6714
Comments
I write a benchmark here: mqliang@7892423 The benchmark compares three serialization methods (serialize a typical metadata map):
Here is the result:
If my implementation is correct, benchmark result shows that using pre-allocate byte array with cache is slightly better than temporary output stream (10% faster -- 373.201 us/op VS. 408.674 us/op, use more memory of course to cache encoded KV, but GC time does not increased -- 1275ms VS 1249ms). It's easy to understand why Not sure whether we should do the change just for getting 10% improvement. |
As @siddharthteotia pointed out in #6710 (comment)_
We need to benchmark this two serialization approach. If the proposed approach is better, will send a PR to address it.
The text was updated successfully, but these errors were encountered: