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

59: Improve Bytes Performance #111

Merged
merged 4 commits into from
Nov 14, 2023
Merged

59: Improve Bytes Performance #111

merged 4 commits into from
Nov 14, 2023

Conversation

artemananiev
Copy link
Member

@artemananiev artemananiev commented Nov 11, 2023

Fix summary:

  • UnsafeUtils class is added to provide a set of utility methods on top of sun.misc.Unsafe
  • Bytes.getInt() and getLong() are implemented using UnsafeUtils
  • A few other Bytes methods are overridden to provide more efficient implementation than what's in RandomAccessData: contains(), asUtf8String()

Testing:

  • Unit tests for UnsafeUtils.getInt() and getLong() are added
  • Unit tests for overridden Bytes methods are added
  • A JMH benchmark for the old and the new getInt() and getLong() implementations is provided

Fixes: #59
Signed-off-by: Artem Ananev artem.ananev@swirldslabs.com

Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
@artemananiev artemananiev added the Performance Issues related to performance concerns. label Nov 11, 2023
@artemananiev artemananiev self-assigned this Nov 11, 2023
Copy link

github-actions bot commented Nov 11, 2023

JUnit Test Report

     39 files       39 suites   3m 6s ⏱️
   505 tests    504 ✔️ 1 💤 0
2 693 runs  2 684 ✔️ 9 💤 0

Results for commit 098ab95.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Nov 11, 2023

Integration Test Report

86 721 tests   86 721 ✔️  4m 31s ⏱️
     209 suites           0 💤
     209 files             0

Results for commit 098ab95.

♻️ This comment has been updated with latest results.

Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
Copy link
Contributor

codacy-production bot commented Nov 14, 2023

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 97ec5f11 71.88%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (97ec5f1) Report Missing Report Missing Report Missing
Head commit (098ab95) 3611 1013 28.05%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#111) 32 23 71.88%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@rbair23
Copy link
Member

rbair23 commented Nov 14, 2023

Do you have any data from before and after this change with JMH? I'm wondering what the raw improvement numbers are.

Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
@artemananiev artemananiev merged commit 3e79908 into main Nov 14, 2023
7 of 8 checks passed
@artemananiev artemananiev deleted the 00059-M-bytes-performance branch November 14, 2023 21:43
@artemananiev artemananiev added this to the 0.7.7 milestone Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Issues related to performance concerns.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Bytes Performance
2 participants