Skip to content

Dispatcher: cover table opcodes and :numeric_for (B5b-v2) #271

@davydog187

Description

@davydog187

Tracked by plan: .agents/plans/B5b-v2-dispatcher-tables.md

The plan file is the source of truth for goal, scope, success criteria, and implementation notes. Comments here are for discussion; the plan is for execution.

Why now

PR #237 (B5a-v2) shipped the dispatcher foundation: ~1.17x median speedup on fib(25). Profiling the full benchmark suite shows that every workload other than fib runs ~0% on the dispatcher today, because the bytecode encoder rejects the whole prototype on the first uncovered opcode and the table-shaped benchmarks all start with :new_table / :numeric_for / :set_table.

Coverage additions in this PR:

  • :numeric_for (the loop primitive every benchmark relies on)
  • :new_table, :get_table, :set_table, :set_field
  • :set_list (basic non-multi-return form)
  • :length (#t) — cheap, prevents single-opcode fallback

After this PR all four table_ops benchmarks compile end-to-end, plus the orchestrators in closures and string_ops.

When this work is picked up

  1. The branch named in the plan's frontmatter is created.
  2. A PR is opened with Closes #<this-issue> in the body.
  3. Merge closes this issue.

For strategic context, see ROADMAP.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    direction:BDirection B: performance investigationkind:perfPerformance change

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions