Skip to content

CotMTA-experiment

No due date 0% complete

Purpose: determine if Cheney on the MTA -style GC and codegen is sufficiently performant. Assumption is that a regular Cheney-GC is a good comparison, with using direct-line code emitted from the same CPS. If CotMTA performance is within 10% of alternative implementation for self-build, I'll assume it's going to be good enough.

Part 1:

  • Implement CPS ir.
  • I…

Purpose: determine if Cheney on the MTA -style GC and codegen is sufficiently performant. Assumption is that a regular Cheney-GC is a good comparison, with using direct-line code emitted from the same CPS. If CotMTA performance is within 10% of alternative implementation for self-build, I'll assume it's going to be good enough.

Part 1:

  • Implement CPS ir.
  • Inlining and constant propagation on the CPS.
  • Transpile to non-CPS-style C.

Rationale: inlining is likely critical for CotMTA performance, since sends will have the extra tax of a continuation call to return. Also make sure there's a good competitor for CotMTA.

Checkpoint 1: should outperform previous by a good margin.

Part 2:

  • Transpile to CPS-style, implement Cheney on the MTA -style GC.

Checkpoint 2: performance comparison. If CotMTA wins at this point, it won already: milestone done.

Part 3:

Assuming CotMTA doesn't win, try to make it win while also giving the other code a fair shake.

Main ideas to implement as optimization of CotMTA:

  • known leaf-calls can just return, callers can check the stack as part of their own entry
  • expansion of above leaf-call optimization: fully known non-recursive call-trees can have return-style codegen instead, with callers into the tree checking stack before

Checkpoint 3: pick the winner

There are no open issues in this milestone.

Add issues to milestones to help organize your work for a particular release or project.

Create new issue

Or find and add issues with no milestone in this repo.