Skip to content

Potential optimization for imported async functions #434

Open
@cpetig

Description

@cpetig

Exported async functions have been changed in November to receive their arguments on the value stack, so these function calls now impose less overhead.

Imported async functions on the other hand still use a heap allocated list to pass arguments. While this is motivated by minimal overhead for back-pressure it penalizes the common case of async function calls with few parameters, e.g. a string or list. The overhead to store the arguments on the host in the (less likely?) back-pressure case could be acceptable in comparison to this unconditional heap allocation on the client side.

When I brought this up in bytecodealliance/wit-bindgen#1082 (comment) Joel proposed to open discussion here.

Metadata

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