Skip to content

Flatten bytes class hierarchy #40

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

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

lu-pinto
Copy link

@lu-pinto lu-pinto commented Mar 4, 2025

PR description

This PR simplifies the Tuweni class hierarchy of the bytes project and attempts to get some performance gains by reducing memory churn, specially for copying byte arrays and Bytes instances. Bytes have now a much flatter class hierarchy that will hopefully improve inlining and reduce time on itable lookups which was identified as one of the problems in Besu for low performance. The implementation of Bytes used at runtime is now highly biased towards ArrayWrappingBytes which makes it easier for JIT to inline and optimize.

This PR is still a work in progress.

lu-pinto added 10 commits March 2, 2025 12:09
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Copy link

github-actions bot commented Mar 4, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@lu-pinto
Copy link
Author

lu-pinto commented Mar 4, 2025

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Mar 4, 2025
@lu-pinto
Copy link
Author

lu-pinto commented Mar 4, 2025

recheck

Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
@lu-pinto lu-pinto force-pushed the flatten-Bytes-class-hierarchy branch from 5438178 to dce2bb4 Compare March 4, 2025 16:09
lu-pinto added 2 commits March 5, 2025 14:58
…nd UInt64

Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
@lu-pinto lu-pinto force-pushed the flatten-Bytes-class-hierarchy branch from 81cb3e2 to 46f5de9 Compare March 6, 2025 13:33
lu-pinto added 4 commits March 6, 2025 13:33
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
@lu-pinto lu-pinto force-pushed the flatten-Bytes-class-hierarchy branch from 0625d27 to 2dbda56 Compare March 12, 2025 16:36
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
@lu-pinto lu-pinto closed this Apr 4, 2025
@lu-pinto lu-pinto reopened this Apr 4, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2025
@lu-pinto lu-pinto marked this pull request as draft April 8, 2025 15:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant