Skip to content

Point out some SharedArrays DoNots #2070

@mstoykov

Description

@mstoykov

SharedArray is special in that it has special underlying implementation. It is meant to work just as any other array, but that doesn't mean htat some operations are not ... bad.

A good example is using .filter or .map on it as both of those will create a new normal array - which usually will remove any of SharedArrays memory efficency benefits.

Also marshalling it or using to store a single big object are other common cases.

Lately also returning it as part of setup has been popping up and it has the same problem as marshalling ... as it is going to be marshalled by setup

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