Skip to content

Profile: is coalescing buffers or multiple writes faster? #98

@vimpunk

Description

@vimpunk

#95 introduced a fallback for disk writes on other platforms. It currently uses a less efficient approach than the Linux positional vectored IO APIs as they are not present on other platforms.

There were two options for the fallback, quoting directly from the implementation:

                // 1. Coalesce the slices to a continuous preallocated memory buffer and
                //    write it at once.
                // 2. Iterate through the slices and issue a separate write call for each.
                //
                // The first option implies preallocating a short-living buffer
                // and destroying it shortly after. The second option
                // implies issuing a big number of writes, and possibly disk I/O operations.

We should benchmark which is actually faster at some point.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions