Skip to content

Impact of copy_as_padded #171

Open
Open
@art-w

Description

There are a bunch of places in the datastructures which makes use of Multicore_magic.copy_as_padded. For example:

https://github.com/ocaml-multicore/saturn/blame/fc34768b90a9f5503b19d1605cf115c241f51888/src/ws_deque.ml#L48

It's very hard to evaluate in the abstract which copy_as_padded are required (so I've to trust that intensive benchmarks were done) and I sometimes wonder if some are there "just in case". Is it possible that abusing copy_as_padded could negatively impact large program performances due to the increase memory usage? (even though the optim looks great in micro-benchmarks? or is the extra space small enough not to be a worry?)

Specifically, I'm wondering if the copy_as_padded that are done on the "root" record of datastructures (as in the link above) are 100% necessary to enable by default? Savvy users and micro-benchmarks can call copy_as_padded themselves in that case? (edit: but a real program that's not hammering the datastructure may not need it)

Also, it would be fun to automate the benchmarking / testing of which copy_as_padded are critical by removing one at a time and checking for an expected perf regression :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions