feat: resolution time of procedurally generated functions#2233
feat: resolution time of procedurally generated functions#2233cieplypolar wants to merge 22 commits intomainfrom
Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (344 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
There was a problem hiding this comment.
Pull request overview
Adds a new apps/resolution-time workspace app to benchmark TypeGPU WGSL resolution time for procedurally generated function trees and generate Mermaid xychart markdown from the results.
Changes:
- Introduces a Vitest-based benchmark harness that generates procedural
tgpu.fngraphs and recordstgpu.resolve()timing and WGSL size to JSON. - Adds a CLI script to convert result JSON datasets into a Mermaid xychart markdown snippet.
- Wires the new app into the workspace dependency graph (lockfile + app-level configs).
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Adds lock entries for the new apps/resolution-time workspace importer and its deps. |
| apps/resolution-time/vitest.config.mts | New Vitest project config using unplugin-typegpu. |
| apps/resolution-time/tsconfig.json | New TS project config extending the repo base config. |
| apps/resolution-time/procedural.ts | Implements the procedural generator + benchmark runs and writes results JSON from Vitest tests. |
| apps/resolution-time/package.json | Defines the new workspace package and scripts/dependencies. |
| apps/resolution-time/generateChart.ts | Implements argument parsing + Mermaid xychart markdown generation. |
| apps/resolution-time/README.md | Documents how to add instructions and generate charts. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "typegpu": "workspace:*" | ||
| }, | ||
| "devDependencies": { | ||
| "bun": "latest", |
There was a problem hiding this comment.
It's safest to pin a specific version range
| "bun": "latest", | |
| "bun": "^1.3.10", |
Changes
Intuition behind generating TypeGPU functions

Example of generated chart (what a speedup 🚀 )
--- config: themeVariables: xyChart: plotColorPalette: "#E63946, #3B82F6, #059669" --- xychart title "resolution time vs function calls (🔴 pr | 🔵 target)" x-axis "calls" [1, 2, 3, 4, 5, 6, 7, 8] y-axis "time (ms)" line [0.06, 0.12, 0.19, 0.25, 0.29, 0.36, 0.43, 0.50] line [0.32, 0.65, 1.25, 1.97, 3.62, 6.90, 14.02, 26.17]TODO:
treeshake-test.yml(WIP [WIP] feat: resolution time benchmark CI #2239)