-
Notifications
You must be signed in to change notification settings - Fork 995
Optimise toFastHex for engine_getBlobsV2 #9426
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
Optimise toFastHex for engine_getBlobsV2 #9426
Conversation
Replaces tuweni impl, adapted from StructLog.toCompactHex but retains leading zeros Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
ahamlat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you share JMH benchmarks to check before and after to see if the new implementation is better in terms of performance ?
Undo parallel streams Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
|
Input size is byte length representing blob (+proof) sizes used in responses for engine_getBlobsV2 |
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
|
Using char array instead of StringBuilder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
- Avoids Tuweni's megamorphic get() and size() calls - Add jmh ToFastHexBenchmark Signed-off-by: Simon Dudley <simon.dudley@consensys.net> Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Replaces tuweni impl, removing the megamorphic calls.
engine_getBlobsV2 uses this since returned blob data is bottlenecked on this conversion.
Other getPayload calls will be updated to use it in a followup PR.
5-6x faster throughput
Before

This PR

Hoodi performance showing control, initial StringBuilder optimisation, final char array impl