perf: improve varint writing performance#618
Conversation
Signed-off-by: Anthony Petrov <anthony@swirldslabs.com>
JUnit Test Report 77 files ±0 77 suites ±0 2m 17s ⏱️ -54s Results for commit 278d3a1. ± Comparison against base commit fd93a3b. This pull request removes 8 and adds 7 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Integration Test Report 405 files ±0 405 suites ±0 17m 15s ⏱️ + 2m 41s Results for commit 278d3a1. ± Comparison against base commit fd93a3b. This pull request removes 3 and adds 3 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
For the sake of interest, can you please attach the results from the jhm runs? |
|
@anies :
Good idea. I've updated the Description of this PR with the results. Please have a look. An uber comment for the results is that we're trying to optimize the most frequent case of 1 byte varint - this is because most field tags in protobuf models only occupy 1 byte, so we want to be super efficient when processing such short varints. |
Description:
Improving parts of varint writing code in PBJ in addition to the improvement already delivered at #614
Also, adding benchmarks for varints.
Most of the code is extracted from a draft PR at #612 with minor modifications to make it compile and to simplify running the benchmarks.
Results from the 4 benchmarks:
Related issue(s):
Fixes #596
Notes for reviewer:
All tests should pass.
Checklist