Skip to content

fill_up_buffer doesn't fill up as much as it could #2

@lilyball

Description

@lilyball

fill_up_buffer keeps doubling the amount it fills with each iteration, but this means that it doesn't fill up as much as it could.

For example, let's say the buffer size is 16 bytes, and the output slice is 3 bytes. fill_up_buffer will end up producing a 12-byte result when it could have produced a 15-byte result.

Incidentally, is doubling the buffer length over and over actually faster than just reading the output slice into the buffer repeatedly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions