zeromq / chumak

Pure Erlang implementation of ZeroMQ Message Transport Protocol.
Mozilla Public License 2.0
197 stars 47 forks source link

Zero-copy support for IO Data Lists like in Phoenix EEX #47

Open heri16 opened 3 years ago

heri16 commented 3 years ago

IO lists in erlang/elixir presents significant latency and memory use improvements.

Are IO lists supported by Chumak as a sort of zero-copy or lazy binary serialization of payload?

https://bignerdranch.com/blog/elixir-and-io-lists-part-1-building-output-efficiently/

https://bignerdranch.com/blog/elixir-and-io-lists-part-2-io-lists-in-phoenix/

heri16 commented 3 years ago

FYI: IO Lists are now officially called IO data.

https://hexdocs.pm/elixir/1.12/IO.html#module-io-data

The documentation explains why it can be used as a more efficient alternative to binaries in certain situations.

drozzy commented 3 years ago

I don't know. Feel free to make a PR if your use case requires it.