Skip to content

Impr: More flexible bool constructor (truthiness check)#2381

Open
cieplypolar wants to merge 20 commits intomainfrom
impr/truthiness-check
Open

Impr: More flexible bool constructor (truthiness check)#2381
cieplypolar wants to merge 20 commits intomainfrom
impr/truthiness-check

Conversation

@cieplypolar
Copy link
Copy Markdown
Collaborator

@cieplypolar cieplypolar commented Apr 14, 2026

Changes:

  • bool constructor mimics JS
  • separate NODE.LogicalExpr
  • automatically casts value to bool if expected type is bool
  • fix NaN check for f16
image

Copilot AI review requested due to automatic review settings April 14, 2026 16:02
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

pkg.pr.new

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

https://pkg.pr.new/software-mansion/TypeGPU/typegpu@bc96215b44f9fc681792ee05ccfa9042efae8889
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/noise@bc96215b44f9fc681792ee05ccfa9042efae8889
https://pkg.pr.new/software-mansion/TypeGPU/unplugin-typegpu@bc96215b44f9fc681792ee05ccfa9042efae8889

benchmark
view benchmark

commit
view commit

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

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.84, 1.65, 3.43, 5.06, 6.46, 10.05, 18.28, 23.02]
  line [0.86, 1.67, 3.39, 5.66, 6.57, 10.08, 18.74, 20.09]
  line [0.83, 1.63, 3.77, 5.40, 5.77, 10.80, 19.19, 19.39]
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.33, 0.55, 0.66, 0.73, 0.94, 1.04, 1.28, 1.44]
  line [0.25, 0.47, 0.61, 0.72, 1.00, 1.04, 1.21, 1.41]
  line [0.30, 0.49, 0.60, 0.73, 1.08, 1.09, 1.30, 1.43]
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.80, 1.69, 3.61, 5.28, 10.85, 22.72, 46.58, 97.35]
  line [0.72, 1.60, 3.31, 5.20, 10.40, 22.15, 48.15, 96.94]
  line [0.81, 1.79, 2.92, 6.20, 11.04, 21.35, 47.12, 97.95]
Loading

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves TGSL boolean handling by making the bool(...) constructor follow JS-like truthiness, introducing a dedicated logical-expression node path, and auto-casting expressions to bool when a boolean is expected (e.g. conditions).

Changes:

  • Updated WGSL generation for unary ! and logical expressions to rely on bool(...) conversion and a dedicated NODE.logicalExpr path.
  • Extended bool schema call signature and codegen to support broader “truthiness” inputs (including NaN-guarding for floats).
  • Updated/added tests to validate truthiness checks and new condition conversion behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/typegpu/tests/tgsl/wgslGenerator.test.ts Adds extensive truthiness-check WGSL snapshot coverage.
packages/typegpu/tests/tgsl/typeInference.test.ts Updates expectations: non-bool conditions now convert to bool instead of throwing.
packages/typegpu/src/tgsl/wgslGenerator.ts Refactors unary ! and logical expression generation to use bool conversion + new logical node.
packages/typegpu/src/tgsl/conversion.ts Auto-casts to bool when the expected type is bool.
packages/typegpu/src/data/wgslTypes.ts Broadens bool callable TS signature to accept unknown.
packages/typegpu/src/data/numeric.ts Implements JS-like truthiness codegen for bool(...) including NaN handling.
packages/typegpu/src/core/function/createCallableSchema.ts Adjusts callable schema typing to return Snippet instead of ResolvedSnippet.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/typegpu/src/tgsl/conversion.ts Outdated
Comment thread packages/typegpu/src/data/numeric.ts Outdated
Comment thread packages/typegpu/src/data/numeric.ts
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

📊 Bundle Size Comparison

🟢 Decreased ➖ Unchanged 🔴 Increased ❔ Unknown
0 57 294 0

👀 Notable results

Static test results:

Test tsdown
dataImportOneDirect.ts 22.75 kB ($${\color{red}+1.9\%}$$)
dataImportOneStar.ts 22.75 kB ($${\color{red}+1.9\%}$$)
stdImportOneDirect.ts 46.34 kB ($${\color{red}+0.9\%}$$)
stdImportOneStar.ts 46.34 kB ($${\color{red}+0.9\%}$$)

Dynamic test results:

‼️ Click to reveal the results table (263 entries).
Test tsdown
bool from typegpudata.ts 11.06 kB ($${\color{red}+4.1\%}$$)
f16 from typegpudata.ts 11.06 kB ($${\color{red}+4.1\%}$$)
f32 from typegpudata.ts 11.06 kB ($${\color{red}+4.1\%}$$)
i32 from typegpudata.ts 11.06 kB ($${\color{red}+4.1\%}$$)
u32 from typegpudata.ts 11.06 kB ($${\color{red}+4.1\%}$$)
u16 from typegpudata.ts 11.08 kB ($${\color{red}+4.0\%}$$)
textureDepth2d from typegpudata.ts 11.50 kB ($${\color{red}+3.9\%}$$)
textureDepthCube from typegpudata.ts 11.51 kB ($${\color{red}+3.9\%}$$)
texture1d from typegpudata.ts 11.51 kB ($${\color{red}+3.9\%}$$)
texture2d from typegpudata.ts 11.51 kB ($${\color{red}+3.9\%}$$)
texture3d from typegpudata.ts 11.51 kB ($${\color{red}+3.9\%}$$)
textureCube from typegpudata.ts 11.52 kB ($${\color{red}+3.9\%}$$)
textureDepth2dArray from typegpudata.ts 11.52 kB ($${\color{red}+3.9\%}$$)
textureDepthCubeArray from typegpudata.ts 11.52 kB ($${\color{red}+3.9\%}$$)
textureDepthMultisampled2d from typegpudata.ts 11.53 kB ($${\color{red}+3.9\%}$$)
texture2dArray from typegpudata.ts 11.53 kB ($${\color{red}+3.9\%}$$)
textureCubeArray from typegpudata.ts 11.53 kB ($${\color{red}+3.9\%}$$)
textureMultisampled2d from typegpudata.ts 11.54 kB ($${\color{red}+3.9\%}$$)
discard from typegpustd.ts 12.26 kB ($${\color{red}+3.6\%}$$)
arrayLength from typegpustd.ts 12.50 kB ($${\color{red}+3.6\%}$$)
extensionEnabled from typegpustd.ts 12.58 kB ($${\color{red}+3.5\%}$$)
range from typegpustd.ts 12.84 kB ($${\color{red}+3.5\%}$$)
disarrayOf from typegpudata.ts 13.01 kB ($${\color{red}+3.4\%}$$)
dpdx from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
dpdxCoarse from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
dpdxFine from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
dpdyCoarse from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
dpdyFine from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
dpdy from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
fwidthCoarse from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
fwidthFine from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
fwidth from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
atomicLoad from typegpustd.ts 13.86 kB ($${\color{red}+3.2\%}$$)
atomicStore from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
textureBarrier from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
atomicAdd from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
atomicAnd from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
atomicMax from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
atomicMin from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
atomicOr from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
atomicSub from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
atomicXor from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
storageBarrier from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
workgroupBarrier from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
vec2b from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec2f from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec2h from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec2i from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec2u from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec3b from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec3f from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec3h from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec3i from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec3u from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec4b from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec4f from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec4h from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec4i from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec4u from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
formatToWGSLType from typegpudata.ts 18.93 kB ($${\color{red}+2.3\%}$$)
uint8 from typegpudata.ts 18.93 kB ($${\color{red}+2.3\%}$$)
float16 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
float16x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
float16x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
float32 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
float32x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
float32x3 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
float32x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint16 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint16x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint16x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint32 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint32x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint32x3 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint32x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint8 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint8x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint8x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
snorm16 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
snorm16x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
snorm16x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
snorm8 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
snorm8x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
snorm8x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint16 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint16x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint16x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint32 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint32x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint32x3 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint32x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint8x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint8x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm10 10 10 2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm16 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm16x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm16x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm8 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm8x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm8x4 bgra from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm8x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
packedFormats from typegpudata.ts 18.96 kB ($${\color{red}+2.3\%}$$)
isPackedData from typegpudata.ts 19.00 kB ($${\color{red}+2.3\%}$$)
alignmentOf from typegpudata.ts 19.98 kB ($${\color{red}+2.2\%}$$)
subgroupAdd from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupAll from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupAnd from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupAny from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupBallot from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupBroadcastFirst from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupBroadcast from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupElect from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupExclusiveAdd from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupExclusiveMul from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupInclusiveAdd from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupInclusiveMul from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupMax from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupMin from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupMul from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupOr from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupShuffleDown from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupShuffleUp from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupShuffleXor from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupShuffle from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupXor from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
isBuiltin from typegpudata.ts 22.71 kB ($${\color{red}+1.9\%}$$)
sizeOf from typegpudata.ts 22.75 kB ($${\color{red}+1.9\%}$$)
isContiguous from typegpudata.ts 22.76 kB ($${\color{red}+1.9\%}$$)
getLongestContiguousPrefix from typegpudata.ts 22.77 kB ($${\color{red}+1.9\%}$$)
textureDimensions from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureGather from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureLoad from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureSampleBaseClampToEdge from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureSampleBias from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureSampleCompareLevel from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureSampleCompare from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureSampleGrad from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureSampleLevel from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureSample from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureStore from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
arrayOf from typegpudata.ts 24.25 kB ($${\color{red}+1.8\%}$$)
size from typegpudata.ts 24.44 kB ($${\color{red}+1.8\%}$$)
align from typegpudata.ts 24.44 kB ($${\color{red}+1.8\%}$$)
location from typegpudata.ts 24.45 kB ($${\color{red}+1.8\%}$$)
interpolate from typegpudata.ts 24.45 kB ($${\color{red}+1.8\%}$$)
invariant from typegpudata.ts 24.82 kB ($${\color{red}+1.8\%}$$)
mat4x4f from typegpudata.ts 24.96 kB ($${\color{red}+1.8\%}$$)
identity2 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
identity3 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
identity4 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
mat2x2f from typegpudata.ts 24.96 kB ($${\color{red}+1.8\%}$$)
mat3x3f from typegpudata.ts 24.96 kB ($${\color{red}+1.8\%}$$)
rotationX4 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
rotationY4 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
rotationZ4 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
scaling4 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
translation4 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
matToArray from typegpudata.ts 25.10 kB ($${\color{red}+1.7\%}$$)
builtin from typegpudata.ts 26.62 kB ($${\color{red}+1.6\%}$$)
pack2x16float from typegpustd.ts 33.97 kB ($${\color{red}+1.3\%}$$)
pack4x8unorm from typegpustd.ts 33.97 kB ($${\color{red}+1.3\%}$$)
unpack2x16float from typegpustd.ts 33.97 kB ($${\color{red}+1.3\%}$$)
unpack4x8unorm from typegpustd.ts 33.97 kB ($${\color{red}+1.3\%}$$)
memoryLayoutOf from typegpudata.ts 40.07 kB ($${\color{red}+1.1\%}$$)
bitcastU32toF32 from typegpustd.ts 42.16 kB ($${\color{red}+1.0\%}$$)
bitcastU32toI32 from typegpustd.ts 42.16 kB ($${\color{red}+1.0\%}$$)
neg from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
add from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
bitShiftLeft from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
bitShiftRight from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
div from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
mod from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
mul from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
sub from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
rotateX4 from typegpustd.ts 47.09 kB ($${\color{red}+0.9\%}$$)
scale4 from typegpustd.ts 47.09 kB ($${\color{red}+0.9\%}$$)
translate4 from typegpustd.ts 47.09 kB ($${\color{red}+0.9\%}$$)
rotateY4 from typegpustd.ts 47.10 kB ($${\color{red}+0.9\%}$$)
rotateZ4 from typegpustd.ts 47.10 kB ($${\color{red}+0.9\%}$$)
common from typegpu.ts 53.68 kB ($${\color{red}+0.8\%}$$)
isUsableAsUniform from typegpu.ts 60.71 kB ($${\color{red}+0.7\%}$$)
isTexture from typegpu.ts 60.72 kB ($${\color{red}+0.7\%}$$)
isSampler from typegpu.ts 60.73 kB ($${\color{red}+0.7\%}$$)
isComparisonSampler from typegpu.ts 60.74 kB ($${\color{red}+0.7\%}$$)
isVariable from typegpu.ts 62.51 kB ($${\color{red}+0.7\%}$$)
dot from typegpustd.ts 63.63 kB ($${\color{red}+0.7\%}$$)
length from typegpustd.ts 63.63 kB ($${\color{red}+0.7\%}$$)
distance from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
dot4U8Packed from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
fract from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
frexp from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
mix from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
modf from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
abs from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
acos from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
acosh from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
asin from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
asinh from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
atan2 from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
atan from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
atanh from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
ceil from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
clamp from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
cos from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
cosh from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
countLeadingZeros from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
countOneBits from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
countTrailingZeros from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
cross from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
degrees from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
determinant from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
dot4I8Packed from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
exp2 from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
exp from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
extractBits from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
faceForward from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
firstLeadingBit from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
firstTrailingBit from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
floor from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
fma from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
insertBits from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
inverseSqrt from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
ldexp from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
log2 from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
log from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
max from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
min from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
normalize from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
pow from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
quantizeToF16 from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
radians from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
reflect from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
refract from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
reverseBits from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
round from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
saturate from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
sign from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
sin from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
sinh from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
smoothstep from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
sqrt from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
step from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
tan from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
tanh from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
transpose from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
trunc from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
and from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
or from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
allEq from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
all from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
eq from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
lt from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
ne from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
not from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
any from typegpustd.ts 49.12 kB ($${\color{red}+0.5\%}$$)
ge from typegpustd.ts 49.12 kB ($${\color{red}+0.5\%}$$)
gt from typegpustd.ts 49.12 kB ($${\color{red}+0.5\%}$$)
isCloseTo from typegpustd.ts 49.12 kB ($${\color{red}+0.5\%}$$)
le from typegpustd.ts 49.12 kB ($${\color{red}+0.5\%}$$)
select from typegpustd.ts 49.12 kB ($${\color{red}+0.5\%}$$)
d from typegpu.ts 84.88 kB ($${\color{red}+0.5\%}$$)
isUsableAsVertex from typegpu.ts 86.29 kB ($${\color{red}+0.5\%}$$)
isBuffer from typegpu.ts 86.29 kB ($${\color{red}+0.5\%}$$)

📋 All results

Click to reveal the results table (350 entries).
Test tsdown
bool from typegpudata.ts 11.06 kB ($${\color{red}+4.1\%}$$)
f16 from typegpudata.ts 11.06 kB ($${\color{red}+4.1\%}$$)
f32 from typegpudata.ts 11.06 kB ($${\color{red}+4.1\%}$$)
i32 from typegpudata.ts 11.06 kB ($${\color{red}+4.1\%}$$)
u32 from typegpudata.ts 11.06 kB ($${\color{red}+4.1\%}$$)
u16 from typegpudata.ts 11.08 kB ($${\color{red}+4.0\%}$$)
textureDepth2d from typegpudata.ts 11.50 kB ($${\color{red}+3.9\%}$$)
textureDepthCube from typegpudata.ts 11.51 kB ($${\color{red}+3.9\%}$$)
texture1d from typegpudata.ts 11.51 kB ($${\color{red}+3.9\%}$$)
texture2d from typegpudata.ts 11.51 kB ($${\color{red}+3.9\%}$$)
texture3d from typegpudata.ts 11.51 kB ($${\color{red}+3.9\%}$$)
textureCube from typegpudata.ts 11.52 kB ($${\color{red}+3.9\%}$$)
textureDepth2dArray from typegpudata.ts 11.52 kB ($${\color{red}+3.9\%}$$)
textureDepthCubeArray from typegpudata.ts 11.52 kB ($${\color{red}+3.9\%}$$)
textureDepthMultisampled2d from typegpudata.ts 11.53 kB ($${\color{red}+3.9\%}$$)
texture2dArray from typegpudata.ts 11.53 kB ($${\color{red}+3.9\%}$$)
textureCubeArray from typegpudata.ts 11.53 kB ($${\color{red}+3.9\%}$$)
textureMultisampled2d from typegpudata.ts 11.54 kB ($${\color{red}+3.9\%}$$)
discard from typegpustd.ts 12.26 kB ($${\color{red}+3.6\%}$$)
arrayLength from typegpustd.ts 12.50 kB ($${\color{red}+3.6\%}$$)
extensionEnabled from typegpustd.ts 12.58 kB ($${\color{red}+3.5\%}$$)
range from typegpustd.ts 12.84 kB ($${\color{red}+3.5\%}$$)
disarrayOf from typegpudata.ts 13.01 kB ($${\color{red}+3.4\%}$$)
dpdx from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
dpdxCoarse from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
dpdxFine from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
dpdyCoarse from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
dpdyFine from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
dpdy from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
fwidthCoarse from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
fwidthFine from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
fwidth from typegpustd.ts 13.11 kB ($${\color{red}+3.4\%}$$)
atomicLoad from typegpustd.ts 13.86 kB ($${\color{red}+3.2\%}$$)
atomicStore from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
textureBarrier from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
atomicAdd from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
atomicAnd from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
atomicMax from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
atomicMin from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
atomicOr from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
atomicSub from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
atomicXor from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
storageBarrier from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
workgroupBarrier from typegpustd.ts 13.87 kB ($${\color{red}+3.2\%}$$)
vec2b from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec2f from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec2h from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec2i from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec2u from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec3b from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec3f from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec3h from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec3i from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec3u from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec4b from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec4f from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec4h from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec4i from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
vec4u from typegpudata.ts 17.44 kB ($${\color{red}+2.5\%}$$)
formatToWGSLType from typegpudata.ts 18.93 kB ($${\color{red}+2.3\%}$$)
uint8 from typegpudata.ts 18.93 kB ($${\color{red}+2.3\%}$$)
float16 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
float16x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
float16x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
float32 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
float32x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
float32x3 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
float32x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint16 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint16x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint16x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint32 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint32x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint32x3 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint32x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint8 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint8x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
sint8x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
snorm16 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
snorm16x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
snorm16x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
snorm8 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
snorm8x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
snorm8x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint16 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint16x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint16x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint32 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint32x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint32x3 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint32x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint8x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
uint8x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm10 10 10 2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm16 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm16x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm16x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm8 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm8x2 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm8x4 bgra from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
unorm8x4 from typegpudata.ts 18.94 kB ($${\color{red}+2.3\%}$$)
packedFormats from typegpudata.ts 18.96 kB ($${\color{red}+2.3\%}$$)
isPackedData from typegpudata.ts 19.00 kB ($${\color{red}+2.3\%}$$)
alignmentOf from typegpudata.ts 19.98 kB ($${\color{red}+2.2\%}$$)
subgroupAdd from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupAll from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupAnd from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupAny from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupBallot from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupBroadcastFirst from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupBroadcast from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupElect from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupExclusiveAdd from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupExclusiveMul from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupInclusiveAdd from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupInclusiveMul from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupMax from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupMin from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupMul from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupOr from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupShuffleDown from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupShuffleUp from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupShuffleXor from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupShuffle from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
subgroupXor from typegpustd.ts 22.01 kB ($${\color{red}+2.0\%}$$)
isBuiltin from typegpudata.ts 22.71 kB ($${\color{red}+1.9\%}$$)
dataImportOneDirect.ts 22.75 kB ($${\color{red}+1.9\%}$$)
dataImportOneStar.ts 22.75 kB ($${\color{red}+1.9\%}$$)
sizeOf from typegpudata.ts 22.75 kB ($${\color{red}+1.9\%}$$)
isContiguous from typegpudata.ts 22.76 kB ($${\color{red}+1.9\%}$$)
getLongestContiguousPrefix from typegpudata.ts 22.77 kB ($${\color{red}+1.9\%}$$)
textureDimensions from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureGather from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureLoad from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureSampleBaseClampToEdge from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureSampleBias from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureSampleCompareLevel from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureSampleCompare from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureSampleGrad from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureSampleLevel from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureSample from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
textureStore from typegpustd.ts 23.77 kB ($${\color{red}+1.8\%}$$)
arrayOf from typegpudata.ts 24.25 kB ($${\color{red}+1.8\%}$$)
size from typegpudata.ts 24.44 kB ($${\color{red}+1.8\%}$$)
align from typegpudata.ts 24.44 kB ($${\color{red}+1.8\%}$$)
location from typegpudata.ts 24.45 kB ($${\color{red}+1.8\%}$$)
interpolate from typegpudata.ts 24.45 kB ($${\color{red}+1.8\%}$$)
invariant from typegpudata.ts 24.82 kB ($${\color{red}+1.8\%}$$)
mat4x4f from typegpudata.ts 24.96 kB ($${\color{red}+1.8\%}$$)
identity2 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
identity3 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
identity4 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
mat2x2f from typegpudata.ts 24.96 kB ($${\color{red}+1.8\%}$$)
mat3x3f from typegpudata.ts 24.96 kB ($${\color{red}+1.8\%}$$)
rotationX4 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
rotationY4 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
rotationZ4 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
scaling4 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
translation4 from typegpustd.ts 24.96 kB ($${\color{red}+1.8\%}$$)
matToArray from typegpudata.ts 25.10 kB ($${\color{red}+1.7\%}$$)
builtin from typegpudata.ts 26.62 kB ($${\color{red}+1.6\%}$$)
pack2x16float from typegpustd.ts 33.97 kB ($${\color{red}+1.3\%}$$)
pack4x8unorm from typegpustd.ts 33.97 kB ($${\color{red}+1.3\%}$$)
unpack2x16float from typegpustd.ts 33.97 kB ($${\color{red}+1.3\%}$$)
unpack4x8unorm from typegpustd.ts 33.97 kB ($${\color{red}+1.3\%}$$)
memoryLayoutOf from typegpudata.ts 40.07 kB ($${\color{red}+1.1\%}$$)
bitcastU32toF32 from typegpustd.ts 42.16 kB ($${\color{red}+1.0\%}$$)
bitcastU32toI32 from typegpustd.ts 42.16 kB ($${\color{red}+1.0\%}$$)
neg from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
add from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
bitShiftLeft from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
bitShiftRight from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
div from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
mod from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
mul from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
sub from typegpustd.ts 46.33 kB ($${\color{red}+0.9\%}$$)
stdImportOneDirect.ts 46.34 kB ($${\color{red}+0.9\%}$$)
stdImportOneStar.ts 46.34 kB ($${\color{red}+0.9\%}$$)
rotateX4 from typegpustd.ts 47.09 kB ($${\color{red}+0.9\%}$$)
scale4 from typegpustd.ts 47.09 kB ($${\color{red}+0.9\%}$$)
translate4 from typegpustd.ts 47.09 kB ($${\color{red}+0.9\%}$$)
rotateY4 from typegpustd.ts 47.10 kB ($${\color{red}+0.9\%}$$)
rotateZ4 from typegpustd.ts 47.10 kB ($${\color{red}+0.9\%}$$)
common from typegpu.ts 53.68 kB ($${\color{red}+0.8\%}$$)
isUsableAsUniform from typegpu.ts 60.71 kB ($${\color{red}+0.7\%}$$)
isTexture from typegpu.ts 60.72 kB ($${\color{red}+0.7\%}$$)
isSampler from typegpu.ts 60.73 kB ($${\color{red}+0.7\%}$$)
isComparisonSampler from typegpu.ts 60.74 kB ($${\color{red}+0.7\%}$$)
isVariable from typegpu.ts 62.51 kB ($${\color{red}+0.7\%}$$)
dot from typegpustd.ts 63.63 kB ($${\color{red}+0.7\%}$$)
length from typegpustd.ts 63.63 kB ($${\color{red}+0.7\%}$$)
distance from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
dot4U8Packed from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
fract from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
frexp from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
mix from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
modf from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
abs from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
acos from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
acosh from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
asin from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
asinh from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
atan2 from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
atan from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
atanh from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
ceil from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
clamp from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
cos from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
cosh from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
countLeadingZeros from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
countOneBits from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
countTrailingZeros from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
cross from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
degrees from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
determinant from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
dot4I8Packed from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
exp2 from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
exp from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
extractBits from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
faceForward from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
firstLeadingBit from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
firstTrailingBit from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
floor from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
fma from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
insertBits from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
inverseSqrt from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
ldexp from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
log2 from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
log from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
max from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
min from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
normalize from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
pow from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
quantizeToF16 from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
radians from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
reflect from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
refract from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
reverseBits from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
round from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
saturate from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
sign from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
sin from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
sinh from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
smoothstep from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
sqrt from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
step from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
tan from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
tanh from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
transpose from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
trunc from typegpustd.ts 63.64 kB ($${\color{red}+0.7\%}$$)
and from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
or from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
allEq from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
all from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
eq from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
lt from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
ne from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
not from typegpustd.ts 49.11 kB ($${\color{red}+0.5\%}$$)
any from typegpustd.ts 49.12 kB ($${\color{red}+0.5\%}$$)
ge from typegpustd.ts 49.12 kB ($${\color{red}+0.5\%}$$)
gt from typegpustd.ts 49.12 kB ($${\color{red}+0.5\%}$$)
isCloseTo from typegpustd.ts 49.12 kB ($${\color{red}+0.5\%}$$)
le from typegpustd.ts 49.12 kB ($${\color{red}+0.5\%}$$)
select from typegpustd.ts 49.12 kB ($${\color{red}+0.5\%}$$)
d from typegpu.ts 84.88 kB ($${\color{red}+0.5\%}$$)
isUsableAsVertex from typegpu.ts 86.29 kB ($${\color{red}+0.5\%}$$)
isBuffer from typegpu.ts 86.29 kB ($${\color{red}+0.5\%}$$)
dataImportEverything.ts 87.19 kB ($${\color{red}+0.5\%}$$)
WgslGenerator from typegpu.ts 102.22 kB ($${\color{red}+0.4\%}$$)
std from typegpu.ts 99.63 kB ($${\color{red}+0.3\%}$$)
stdImportEverything.ts 102.40 kB ($${\color{red}+0.3\%}$$)
tgpuImportEverything.ts 252.51 kB ($${\color{red}+0.2\%}$$)
tgpu from typegpu.ts 252.51 kB ($${\color{red}+0.2\%}$$)
tgpu.fn from typegpu.ts 252.51 kB ($${\color{red}+0.2\%}$$)
tgpu.init from typegpu.ts 252.51 kB ($${\color{red}+0.2\%}$$)
tgpu.lazy from typegpu.ts 252.51 kB ($${\color{red}+0.2\%}$$)
tgpu.slot from typegpu.ts 252.51 kB ($${\color{red}+0.2\%}$$)
tgpu.const from typegpu.ts 252.52 kB ($${\color{red}+0.2\%}$$)
tgpu.unroll from typegpu.ts 252.52 kB ($${\color{red}+0.2\%}$$)
tgpu.resolve from typegpu.ts 252.52 kB ($${\color{red}+0.2\%}$$)
tgpu.accessor from typegpu.ts 252.52 kB ($${\color{red}+0.2\%}$$)
tgpu.comptime from typegpu.ts 252.52 kB ($${\color{red}+0.2\%}$$)
tgpu.vertexFn from typegpu.ts 252.52 kB ($${\color{red}+0.2\%}$$)
tgpu.computeFn from typegpu.ts 252.52 kB ($${\color{red}+0.2\%}$$)
tgpu.fragmentFn from typegpu.ts 252.52 kB ($${\color{red}+0.2\%}$$)
tgpu.privateVar from typegpu.ts 252.52 kB ($${\color{red}+0.2\%}$$)
tgpuImportOne.ts 252.52 kB ($${\color{red}+0.2\%}$$)
tgpu.vertexLayout from typegpu.ts 252.52 kB ($${\color{red}+0.2\%}$$)
tgpu.workgroupVar from typegpu.ts 252.52 kB ($${\color{red}+0.2\%}$$)
tgpu.initFromDevice from typegpu.ts 252.52 kB ($${\color{red}+0.2\%}$$)
tgpu.bindGroupLayout from typegpu.ts 252.53 kB ($${\color{red}+0.2\%}$$)
tgpu.mutableAccessor from typegpu.ts 252.53 kB ($${\color{red}+0.2\%}$$)
tgpu.resolveWithContext from typegpu.ts 252.53 kB ($${\color{red}+0.2\%}$$)
importEntireLibrary.ts 279.76 kB ($${\color{red}+0.1\%}$$)
functionWithUseGpu.ts 282 B (➖)
functionWithoutUseGpu.ts 24 B (➖)
MissingBindGroupsError from typegpu.ts 1.34 kB (➖)
MissingLinksError from typegpu.ts 201 B (➖)
MissingSlotValueError from typegpu.ts 151 B (➖)
MissingVertexBuffersError from typegpu.ts 1.35 kB (➖)
NotUniformError from typegpu.ts 1.30 kB (➖)
ResolutionError from typegpu.ts 1.55 kB (➖)
ShaderGenerator from typegpu.ts 1.80 kB (➖)
Void from typegpudata.ts 734 B (➖)
atomic from typegpudata.ts 779 B (➖)
comparisonSampler from typegpudata.ts 753 B (➖)
deepEqual from typegpudata.ts 2.77 kB (➖)
isAccessor from typegpu.ts 65 B (➖)
isAlignAttrib from typegpudata.ts 755 B (➖)
isAtomic from typegpudata.ts 755 B (➖)
isBufferShorthand from typegpu.ts 1.81 kB (➖)
isBuiltinAttrib from typegpudata.ts 757 B (➖)
isData from typegpudata.ts 2.39 kB (➖)
isDecorated from typegpudata.ts 758 B (➖)
isDisarray from typegpudata.ts 1.69 kB (➖)
isInterpolateAttrib from typegpudata.ts 761 B (➖)
isLazy from typegpu.ts 61 B (➖)
isLocationAttrib from typegpudata.ts 758 B (➖)
isLooseData from typegpudata.ts 1.74 kB (➖)
isLooseDecorated from typegpudata.ts 1.70 kB (➖)
isMutableAccessor from typegpu.ts 73 B (➖)
isPtr from typegpudata.ts 752 B (➖)
isSizeAttrib from typegpudata.ts 754 B (➖)
isSlot from typegpu.ts 61 B (➖)
isTgpuComputeFn from typegpu.ts 69 B (➖)
isTgpuFn from typegpu.ts 765 B (➖)
isTgpuFragmentFn from typegpu.ts 70 B (➖)
isTgpuVertexFn from typegpu.ts 68 B (➖)
isUnstruct from typegpudata.ts 1.69 kB (➖)
isUsableAsRender from typegpu.ts 55 B (➖)
isUsableAsSampled from typegpu.ts 56 B (➖)
isUsableAsStorage from typegpu.ts 56 B (➖)
isWgslArray from typegpudata.ts 754 B (➖)
isWgslData from typegpudata.ts 1.31 kB (➖)
isWgslStruct from typegpudata.ts 755 B (➖)
ptrFn from typegpudata.ts 859 B (➖)
ptrHandle from typegpudata.ts 851 B (➖)
ptrPrivate from typegpudata.ts 858 B (➖)
ptrStorage from typegpudata.ts 856 B (➖)
ptrUniform from typegpudata.ts 852 B (➖)
ptrWorkgroup from typegpudata.ts 860 B (➖)
ref from typegpudata.ts 4.18 kB (➖)
sampler from typegpudata.ts 742 B (➖)
struct from typegpudata.ts 3.37 kB (➖)
textureExternal from typegpudata.ts 873 B (➖)
textureStorage1d from typegpudata.ts 1.01 kB (➖)
textureStorage2dArray from typegpudata.ts 1.03 kB (➖)
textureStorage2d from typegpudata.ts 1.01 kB (➖)
textureStorage3d from typegpudata.ts 1.01 kB (➖)
unstruct from typegpudata.ts 1.65 kB (➖)

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

@iwoplaza iwoplaza added this to the 0.11.3 milestone Apr 15, 2026
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.

3 participants