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

ByteString.toArrayUnsafe method for zero copy transformation of bytestrings #30262

Merged
merged 3 commits into from Jun 2, 2021

Conversation

johanandren
Copy link
Member

Refs #30257

@akka-ci akka-ci added the validating PR is currently being validated by Jenkins label May 26, 2021
@akka-ci akka-ci added needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed validating PR is currently being validated by Jenkins labels May 26, 2021
@akka-ci
Copy link

akka-ci commented May 26, 2021

Test FAILed.

@akka-ci akka-ci added validating PR is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) validating PR is currently being validated by Jenkins labels May 26, 2021
@akka-ci
Copy link

akka-ci commented May 26, 2021

Test PASSed.

Copy link
Member

@patriknw patriknw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@patriknw
Copy link
Member

I think this is good, small step, but looking at jfr dump there are also rather many rope ByteStrings

Screenshot 2021-05-26 at 15 59 48

@akka-ci
Copy link

akka-ci commented May 26, 2021

Test PASSed.

@johanandren
Copy link
Member Author

@patriknw did you see the other PR as well? #30263

@johanandren johanandren added the 2 - pick next Used to mark issues which are next up in the queue to be worked on. The tag is non-binding label May 28, 2021
* only read the bytes and never mutate then. For all other intents and purposes, please use the usual
* toArray method - which provide the immutability guarantees by copying the backing array.
*/
def toArrayUnsafe(): Array[Byte] = toArray
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No optimized implementation for scala3?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is same as for 2.12 and 2.13, the optimizations are in the overrides

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is same as for 2.12 and 2.13, the optimizations are in the overrides

@patriknw patriknw merged commit 5584037 into akka:master Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - pick next Used to mark issues which are next up in the queue to be worked on. The tag is non-binding tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants