Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Why is encoding not in the type? #3

Open
@skuzmich

Description

@skuzmich

Wasm engines that know available encoding statically would sometimes be able to generate more efficient code, especially when compiling without dynamic profile information.

Then we can have instruction to convert between different encodings. Conversion result can also be cached to external hash table (or to an object slot) by engine to avoid repeating the same conversion multiple types.

Would JS embeddings require wrapping JS string with an extra Wasm string object in order to provide an extra WTF-8 slot? Knowing WTF-16 encoding statically would help to avoid that.

This also could scale better with adding more encodings in the future. More than two encoding slots per objects would mandate indirect access, right?

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