feat: resolution time of procedurally generated functions#2233
Open
cieplypolar wants to merge 18 commits intomainfrom
Open
feat: resolution time of procedurally generated functions#2233cieplypolar wants to merge 18 commits intomainfrom
cieplypolar wants to merge 18 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)