Skip to content

feat: Early return pruning#2711

Draft
iwoplaza wants to merge 1 commit into
mainfrom
feat/early-return-pruning
Draft

feat: Early return pruning#2711
iwoplaza wants to merge 1 commit into
mainfrom
feat/early-return-pruning

Conversation

@iwoplaza

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown

pkg.pr.new

packages
Ready to be installed by your favorite package manager ⬇️

https://pkg.pr.new/software-mansion/TypeGPU/tgpu-gen@1584c7e3fc7554df2379bf5a77ce19a907f48e3b
https://pkg.pr.new/software-mansion/TypeGPU/tinyest-for-wgsl@1584c7e3fc7554df2379bf5a77ce19a907f48e3b
https://pkg.pr.new/software-mansion/TypeGPU/typegpu@1584c7e3fc7554df2379bf5a77ce19a907f48e3b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/cli@1584c7e3fc7554df2379bf5a77ce19a907f48e3b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/color@1584c7e3fc7554df2379bf5a77ce19a907f48e3b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/gl@1584c7e3fc7554df2379bf5a77ce19a907f48e3b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/noise@1584c7e3fc7554df2379bf5a77ce19a907f48e3b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/radiance-cascades@1584c7e3fc7554df2379bf5a77ce19a907f48e3b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/react@1584c7e3fc7554df2379bf5a77ce19a907f48e3b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/sdf@1584c7e3fc7554df2379bf5a77ce19a907f48e3b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/three@1584c7e3fc7554df2379bf5a77ce19a907f48e3b
https://pkg.pr.new/software-mansion/TypeGPU/unplugin-typegpu@1584c7e3fc7554df2379bf5a77ce19a907f48e3b

benchmark
view benchmark

commit
view commit

@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown

Bundle size comparison (import * as ... in PR vs import * as ... in target):

🟢 Decreased ➖ Unchanged 🔴 Increased (max 0.40%) ❔ Unknown
0 300 21 0

import { ... } in PR vs import * as ... in PR (is the library tree-Shakeable?):

Test tsdown
tgpu_init.ts 257.50 kB ($${\color{green}-3.2\%}$$)
tgpu_initFromDevice.ts 256.99 kB ($${\color{green}-3.4\%}$$)
tgpu_resolve.ts 188.22 kB ($${\color{green}-29.2\%}$$)
tgpu_resolveWithContext.ts 188.15 kB ($${\color{green}-29.3\%}$$)
tgpu_bindGroupLayout.ts 69.01 kB ($${\color{green}-74.1\%}$$)
tgpu_mutableAccessor.ts 65.98 kB ($${\color{green}-75.2\%}$$)
tgpu_accessor.ts 65.97 kB ($${\color{green}-75.2\%}$$)
tgpu_privateVar.ts 65.30 kB ($${\color{green}-75.4\%}$$)
tgpu_workgroupVar.ts 65.30 kB ($${\color{green}-75.4\%}$$)
tgpu_const.ts 64.53 kB ($${\color{green}-75.7\%}$$)
tgpu_fn.ts 37.97 kB ($${\color{green}-85.7\%}$$)
tgpu_fragmentFn.ts 37.91 kB ($${\color{green}-85.7\%}$$)
tgpu_vertexFn.ts 37.72 kB ($${\color{green}-85.8\%}$$)
tgpu_computeFn.ts 37.43 kB ($${\color{green}-85.9\%}$$)
tgpu_vertexLayout.ts 26.61 kB ($${\color{green}-90.0\%}$$)
tgpu_comptime.ts 14.41 kB ($${\color{green}-94.6\%}$$)
tgpu_unroll.ts 2.60 kB ($${\color{green}-99.0\%}$$)
tgpu_slot.ts 1.57 kB ($${\color{green}-99.4\%}$$)
tgpu_lazy.ts 1.22 kB ($${\color{green}-99.5\%}$$)

If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.

@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown

Resolution Time Benchmark

---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.98, 1.98, 4.41, 7.46, 8.03, 10.43, 22.43, 25.32]
  line [0.99, 1.98, 4.13, 6.70, 7.39, 11.70, 23.28, 24.64]
  line [0.94, 1.94, 4.60, 6.92, 7.61, 11.62, 22.25, 25.23]
Loading
---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.35, 0.54, 0.67, 0.82, 1.09, 1.20, 1.41, 1.60]
  line [0.29, 0.57, 0.71, 0.89, 1.09, 1.21, 1.46, 1.67]
  line [0.29, 0.51, 0.69, 0.83, 1.12, 1.19, 1.43, 1.57]
Loading
---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.84, 2.29, 4.57, 6.63, 12.77, 27.13, 57.14, 118.54]
  line [0.86, 2.11, 3.63, 6.76, 13.00, 26.40, 56.35, 116.01]
  line [0.98, 2.09, 3.73, 6.94, 12.88, 26.22, 56.67, 114.88]
Loading

@iwoplaza iwoplaza force-pushed the feat/early-return-pruning branch 4 times, most recently from d61302f to af14e94 Compare July 12, 2026 17:39
@iwoplaza iwoplaza force-pushed the feat/early-return-pruning branch from af14e94 to 1584c7e Compare July 12, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant