Skip to content

improve masking function memory/speed #16

@the-mikedavis

Description

@the-mikedavis

Currently we use Stream.cycle/1 and Enum.reduce_while/3 for the implementation of the masking function.

This is probably very suboptimal in terms of speed and memory consumption. If I understand Elixir/Erlang performance correctly, binary matches are always to be preferred for speed/memory. Also we're only doing the xor of 1 byte (unsigned big integer) at a time and we could be doing it with up to four bytes (the size of the mask)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions