Skip to content

VS Code extension with inline cache hints #21

Description

@AveryClapp

Feature Description

VS Code extension that shows cache behavior inline in the editor.

UI

int sum = 0;
for (int i = 0; i < n; i++) {
    sum += arr[i];  // ✓ 99.2% hit rate (L1)
}

for (int i = 0; i < n; i += 64) {
    sum += arr[i];  // ⚠ 45.3% hit rate (L2 miss)
}

Features

  • CodeLens annotations with hit rates
  • Underline hot lines in red/yellow/green
  • Hover for detailed stats
  • Quick fix suggestions ("Add __restrict here")
  • Run analysis from command palette

Implementation

  • VS Code extension boilerplate
  • Call cache-explore CLI
  • Parse JSON output
  • Map line numbers to editor
  • Cache results (don't re-run on every edit)

Files

  • vscode-extension/ (new package)
  • vscode-extension/src/extension.ts

Publishing

  • VS Code Marketplace
  • Open VSX for VS Codium users

References

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions