-
Notifications
You must be signed in to change notification settings - Fork 27
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
Optimize Chunk #136
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Chunk
is now just a thin wrapper for an Array. It should be optimized to avoid unnecessary copying of data. Operations like concatenation,drop
,take
,splitAt
etc. should be reimplemented. Such approach has been taken by libs likefs2
andzio
, as well as Pekko'sByteString
. All these libraries use their representations to represent a byte array with performance optimizations, to keep good efficiency in stream processing.ZIO: https://github.com/zio/zio/blob/76a463192ef27c5f1ccc038cf93fe35b42ad4869/core/shared/src/main/scala/zio/Chunk.scala
fs2: https://github.com/typelevel/fs2/blob/main/core/shared/src/main/scala/fs2/Chunk.scala
Pekko: https://github.com/apache/pekko/blob/d98942dd3b021874ac324464f3fd788f9be046df/actor/src/main/scala-2.13/org/apache/pekko/util/ByteString.scala
The text was updated successfully, but these errors were encountered: