Skip to content

Consider supporting stringref strings #41

@pufferfish101007

Description

@pufferfish101007

Chrome has supported stringref via --wasm-staging/enable-experimental-webassembly-features since 2023 (and hopefully they won't remove it too soon); it may be worth investigating performance benefits of emitting stringref instructions rather than externref, especially as we can't take advantage of most JS string builtin functions due to scratch quirks.

Binaryen also supports its own form of stringref, for optimisation, so it may turn out to be beneficial for wasm-opt (const folding in particular) for us to emit stringref. (I am not clear if it is possible for binaryen to emit stringref, or if it always lowers to js-string-builtins).

It may be that #42 means that any const-folding opportunities offered by emitting stringref are nullified.

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