Skip to content

Sort the local variable order with the most frequently referenced first. #18

Closed

Description

To give a canonical ordering for experimenting with the encoding efficiency it might help to sort each functions local variables with the most frequently referenced first. This way an encoding optimizing for small local variable indexes might do best, such as the polyfill-prototype-1. I assume similar encoding optimizations will be used in the MVP too because it appears quite effective.

Activity

  1. kripken commented on Dec 21, 2015

    @kripken
    Member

    We can do this in a binaryen pass, then it wouldn't be tied to asm2wasm (but asm2wasm could run it in its optimizations phase).

  2. changed the title [-]asm2wasm: sort the local variable order with the most frequently referenced first.[/-] [+]Sort the local variable order with the most frequently referenced first.[/+] on Dec 21, 2015
  3. tlively commented on Dec 13, 2024

    @tlively
    Member

    This is done by the ReorderLocals pass.

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

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