pjfanning commented on PR #1085:
URL: https://github.com/apache/incubator-pekko/pull/1085#issuecomment-1920961420

   I have a basic benchmark that shows that ByteString.asInputStream is faster 
than new ByteArrayInputStream(ByteString.toArray). The latter is the current 
safe way to create an InputStream for a ByteString.
   
   I have also tested ByteArrayInputStream(ByteString.toArrayUnsafe) which is 
about as fast as ByteString.asInputStream for simple ByteStrings (single 
arrays) but is slow like ByteArrayInputStream(ByteString.toArray) when you have 
byte strings composed of many smaller byte strings.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to