Skip to content

Dedicated opcode for % and // (code size and instruction cost) #157

Open

Description

@howlcipher

From Motoko's #153 review. Each % compiles to about 11.7 KB and each // to about 22.7 KB (about 1.2 KB before #149), so a program with about 450 of them exceeds the 10 MiB load cap. 200 × (% 1e300 (+ i 0.5)) hits the 64 MiB memory limit. Small int ops cost about 3.2x per op. Consider a dedicated opcode, with parity tests on all three paths.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions