Skip to content

Compiler/VM Optimizations #4364

@SupunS

Description

@SupunS

Quick wins / Low hanging:

most impactful potentially:

other:

Long term (more work):

  • Peephole optimizations #4305
  • Emit VM functions in compiler (Direct Call Threading)
  • Re-use getField results where possible (requires liveness analysis)
  • Add "resource-ness" (flag) to the static-type. Might need a state migration. (maybe not needed for the initial version)
    • Move resource-ness from instruction to static type (currently instructions have resource-nes operand)
  • Optimize conversion function calls
    • Constant literal argument (e.g. UInt32(1)) -> Emit constant load (GetConstant). avoids call
    • Other argument (e.g. let x: UInt8 = 1; UInt32(x)) -> Call specific target/source conversion function ($UInt8ToUInt32(x)). avoids run-time type dispatch in conversion function
  • concurrent processing in Cadence

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions