-
-
Notifications
You must be signed in to change notification settings - Fork 46
chore: Analyse the typegpu entry points #2042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Analyse the typegpu entry points #2042
Conversation
|
pkg.pr.new packages benchmark commit |
## 📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:
|
| Test | tsdown | webpack |
|---|---|---|
| MissingBindGroupsError from typegpu.ts | 1.06 kB | N/A |
| MissingLinksError from typegpu.ts | 208 B | N/A |
| MissingSlotValueError from typegpu.ts | 153 B | N/A |
| MissingVertexBuffersError from typegpu.ts | 1.07 kB | N/A |
| NotUniformError from typegpu.ts | 1.02 kB | N/A |
| ResolutionError from typegpu.ts | 1.26 kB | N/A |
| Void from typegpudata.ts | 610 B | N/A |
| abs from typegpustd.ts | 79.52 kB | N/A |
| acos from typegpustd.ts | 79.52 kB | N/A |
| acosh from typegpustd.ts | 79.52 kB | N/A |
| add from typegpustd.ts | 61.97 kB | N/A |
| align from typegpudata.ts | 41.96 kB | N/A |
| alignmentOf from typegpudata.ts | 38.37 kB | N/A |
| allEq from typegpustd.ts | 64.32 kB | N/A |
| all from typegpustd.ts | 64.32 kB | N/A |
| and from typegpustd.ts | 64.32 kB | N/A |
| any from typegpustd.ts | 64.33 kB | N/A |
| arrayLength from typegpustd.ts | 10.82 kB | N/A |
| arrayOf from typegpudata.ts | 42.41 kB | N/A |
| asin from typegpustd.ts | 79.52 kB | N/A |
| asinh from typegpustd.ts | 79.52 kB | N/A |
| atan2 from typegpustd.ts | 79.52 kB | N/A |
| atan from typegpustd.ts | 79.52 kB | N/A |
| atanh from typegpustd.ts | 79.52 kB | N/A |
| atomicAdd from typegpustd.ts | 12.33 kB | N/A |
| atomicAnd from typegpustd.ts | 12.33 kB | N/A |
| atomicLoad from typegpustd.ts | 12.32 kB | N/A |
| atomicMax from typegpustd.ts | 12.33 kB | N/A |
| atomicMin from typegpustd.ts | 12.33 kB | N/A |
| atomicOr from typegpustd.ts | 12.33 kB | N/A |
| atomicStore from typegpustd.ts | 12.33 kB | N/A |
| atomicSub from typegpustd.ts | 12.33 kB | N/A |
| atomicXor from typegpustd.ts | 12.33 kB | N/A |
| atomic from typegpudata.ts | 649 B | N/A |
| bitcastU32toF32 from typegpustd.ts | 59.73 kB | N/A |
| bitcastU32toI32 from typegpustd.ts | 59.74 kB | N/A |
| bool from typegpudata.ts | 10.36 kB | N/A |
| builtin from typegpudata.ts | 44.77 kB | N/A |
| ceil from typegpustd.ts | 79.52 kB | N/A |
| clamp from typegpustd.ts | 79.52 kB | N/A |
| comparisonSampler from typegpudata.ts | 629 B | N/A |
| cos from typegpustd.ts | 79.52 kB | N/A |
| cosh from typegpustd.ts | 79.52 kB | N/A |
| countLeadingZeros from typegpustd.ts | 79.52 kB | N/A |
| countOneBits from typegpustd.ts | 79.52 kB | N/A |
| countTrailingZeros from typegpustd.ts | 79.52 kB | N/A |
| cross from typegpustd.ts | 79.52 kB | N/A |
| deepEqual from typegpudata.ts | 2.49 kB | N/A |
| degrees from typegpustd.ts | 79.52 kB | N/A |
| determinant from typegpustd.ts | 79.52 kB | N/A |
| disarrayOf from typegpudata.ts | 39.17 kB | N/A |
| discard from typegpustd.ts | 8.97 kB | N/A |
| distance from typegpustd.ts | 79.52 kB | N/A |
| div from typegpustd.ts | 61.97 kB | N/A |
| dot4I8Packed from typegpustd.ts | 79.52 kB | N/A |
| dot4U8Packed from typegpustd.ts | 79.52 kB | N/A |
| dot from typegpustd.ts | 79.51 kB | N/A |
| dpdxCoarse from typegpustd.ts | 9.77 kB | N/A |
| dpdxFine from typegpustd.ts | 9.77 kB | N/A |
| dpdx from typegpustd.ts | 9.77 kB | N/A |
| dpdyCoarse from typegpustd.ts | 9.77 kB | N/A |
| dpdyFine from typegpustd.ts | 9.77 kB | N/A |
| dpdy from typegpustd.ts | 9.77 kB | N/A |
| eq from typegpustd.ts | 64.32 kB | N/A |
| exp2 from typegpustd.ts | 79.52 kB | N/A |
| exp from typegpustd.ts | 79.52 kB | N/A |
| extensionEnabled from typegpustd.ts | 12.03 kB | N/A |
| extractBits from typegpustd.ts | 79.52 kB | N/A |
| f16 from typegpudata.ts | 10.36 kB | N/A |
| f32 from typegpudata.ts | 10.36 kB | N/A |
| faceForward from typegpustd.ts | 79.52 kB | N/A |
| firstLeadingBit from typegpustd.ts | 79.52 kB | N/A |
| firstTrailingBit from typegpustd.ts | 79.52 kB | N/A |
| float16 from typegpudata.ts | 36.56 kB | N/A |
| float16x2 from typegpudata.ts | 36.56 kB | N/A |
| float16x4 from typegpudata.ts | 36.56 kB | N/A |
| float32 from typegpudata.ts | 36.56 kB | N/A |
| float32x2 from typegpudata.ts | 36.56 kB | N/A |
| float32x3 from typegpudata.ts | 36.56 kB | N/A |
| float32x4 from typegpudata.ts | 36.56 kB | N/A |
| floor from typegpustd.ts | 79.52 kB | N/A |
| fma from typegpustd.ts | 79.52 kB | N/A |
| formatToWGSLType from typegpudata.ts | 37.08 kB | N/A |
| fract from typegpustd.ts | 79.52 kB | N/A |
| frexp from typegpustd.ts | 79.52 kB | N/A |
| fwidthCoarse from typegpustd.ts | 9.77 kB | N/A |
| fwidthFine from typegpustd.ts | 9.77 kB | N/A |
| fwidth from typegpustd.ts | 9.77 kB | N/A |
| ge from typegpustd.ts | 64.32 kB | N/A |
| gt from typegpustd.ts | 64.33 kB | N/A |
| i32 from typegpudata.ts | 10.36 kB | N/A |
| identity2 from typegpustd.ts | 42.86 kB | N/A |
| identity3 from typegpustd.ts | 42.86 kB | N/A |
| identity4 from typegpustd.ts | 42.86 kB | N/A |
| insertBits from typegpustd.ts | 79.52 kB | N/A |
| interpolate from typegpudata.ts | 41.96 kB | N/A |
| invariant from typegpudata.ts | 42.33 kB | N/A |
| inverseSqrt from typegpustd.ts | 79.52 kB | N/A |
| isAlignAttrib from typegpudata.ts | 631 B | N/A |
| isAtomic from typegpudata.ts | 631 B | N/A |
| isBufferShorthand from typegpu.ts | 1.39 kB | N/A |
| isBuffer from typegpu.ts | 96.76 kB | N/A |
| isBuiltinAttrib from typegpudata.ts | 633 B | N/A |
| isBuiltin from typegpudata.ts | 40.37 kB | N/A |
| isCloseTo from typegpustd.ts | 64.33 kB | N/A |
| isComparisonSampler from typegpu.ts | 64.03 kB | N/A |
| isData from typegpudata.ts | 2.10 kB | N/A |
| isDecorated from typegpudata.ts | 634 B | N/A |
| isDerived from typegpu.ts | 71 B | N/A |
| isDisarray from typegpudata.ts | 1.40 kB | N/A |
| isInterpolateAttrib from typegpudata.ts | 637 B | N/A |
| isLocationAttrib from typegpudata.ts | 634 B | N/A |
| isLooseData from typegpudata.ts | 1.44 kB | N/A |
| isLooseDecorated from typegpudata.ts | 1.41 kB | N/A |
| isPackedData from typegpudata.ts | 37.15 kB | N/A |
| isPtr from typegpudata.ts | 628 B | N/A |
| isSampler from typegpu.ts | 64.02 kB | N/A |
| isSizeAttrib from typegpudata.ts | 630 B | N/A |
| isSlot from typegpu.ts | 68 B | N/A |
| isTexture from typegpu.ts | 64.01 kB | N/A |
| isTgpuFn from typegpu.ts | 641 B | N/A |
| isUnstruct from typegpudata.ts | 1.40 kB | N/A |
| isUsableAsRender from typegpu.ts | 62 B | N/A |
| isUsableAsSampled from typegpu.ts | 63 B | N/A |
| isUsableAsStorage from typegpu.ts | 63 B | N/A |
| isUsableAsUniform from typegpu.ts | 64.77 kB | N/A |
| isUsableAsVertex from typegpu.ts | 96.76 kB | N/A |
| isVariable from typegpu.ts | 65.76 kB | N/A |
| isWgslArray from typegpudata.ts | 630 B | N/A |
| isWgslData from typegpudata.ts | 1.19 kB | N/A |
| isWgslStruct from typegpudata.ts | 631 B | N/A |
| ldexp from typegpustd.ts | 79.52 kB | N/A |
| le from typegpustd.ts | 64.33 kB | N/A |
| length from typegpustd.ts | 79.51 kB | N/A |
| location from typegpudata.ts | 41.96 kB | N/A |
| log2 from typegpustd.ts | 79.52 kB | N/A |
| log from typegpustd.ts | 79.52 kB | N/A |
| lt from typegpustd.ts | 64.32 kB | N/A |
| mat2x2f from typegpudata.ts | 42.86 kB | N/A |
| mat3x3f from typegpudata.ts | 42.86 kB | N/A |
| mat4x4f from typegpudata.ts | 42.85 kB | N/A |
| matToArray from typegpudata.ts | 42.99 kB | N/A |
| max from typegpustd.ts | 79.52 kB | N/A |
| min from typegpustd.ts | 79.52 kB | N/A |
| mix from typegpustd.ts | 79.52 kB | N/A |
| mod from typegpustd.ts | 61.97 kB | N/A |
| modf from typegpustd.ts | 79.52 kB | N/A |
| mul from typegpustd.ts | 61.97 kB | N/A |
| ne from typegpustd.ts | 64.32 kB | N/A |
| neg from typegpustd.ts | 61.97 kB | N/A |
| normalize from typegpustd.ts | 79.52 kB | N/A |
| not from typegpustd.ts | 64.32 kB | N/A |
| or from typegpustd.ts | 64.32 kB | N/A |
| pack2x16float from typegpustd.ts | 51.30 kB | N/A |
| pack4x8unorm from typegpustd.ts | 51.30 kB | N/A |
| packedFormats from typegpudata.ts | 37.11 kB | N/A |
| pow from typegpustd.ts | 79.52 kB | N/A |
| ptrFn from typegpudata.ts | 735 B | N/A |
| ptrHandle from typegpudata.ts | 727 B | N/A |
| ptrPrivate from typegpudata.ts | 734 B | N/A |
| ptrStorage from typegpudata.ts | 732 B | N/A |
| ptrUniform from typegpudata.ts | 728 B | N/A |
| ptrWorkgroup from typegpudata.ts | 736 B | N/A |
| quantizeToF16 from typegpustd.ts | 79.52 kB | N/A |
| radians from typegpustd.ts | 79.52 kB | N/A |
| ref from typegpudata.ts | 3.73 kB | N/A |
| reflect from typegpustd.ts | 79.52 kB | N/A |
| refract from typegpustd.ts | 79.52 kB | N/A |
| reverseBits from typegpustd.ts | 79.52 kB | N/A |
| rotateX4 from typegpustd.ts | 62.76 kB | N/A |
| rotateY4 from typegpustd.ts | 62.76 kB | N/A |
| rotateZ4 from typegpustd.ts | 62.76 kB | N/A |
| rotationX4 from typegpustd.ts | 42.86 kB | N/A |
| rotationY4 from typegpustd.ts | 42.86 kB | N/A |
| rotationZ4 from typegpustd.ts | 42.86 kB | N/A |
| round from typegpustd.ts | 79.52 kB | N/A |
| sampler from typegpudata.ts | 618 B | N/A |
| saturate from typegpustd.ts | 79.52 kB | N/A |
| scale4 from typegpustd.ts | 62.76 kB | N/A |
| scaling4 from typegpustd.ts | 42.86 kB | N/A |
| select from typegpustd.ts | 64.33 kB | N/A |
| sign from typegpustd.ts | 79.52 kB | N/A |
| sin from typegpustd.ts | 79.52 kB | N/A |
| sinh from typegpustd.ts | 79.52 kB | N/A |
| sint16 from typegpudata.ts | 36.56 kB | N/A |
| sint16x2 from typegpudata.ts | 36.56 kB | N/A |
| sint16x4 from typegpudata.ts | 36.56 kB | N/A |
| sint32 from typegpudata.ts | 36.56 kB | N/A |
| sint32x2 from typegpudata.ts | 36.56 kB | N/A |
| sint32x3 from typegpudata.ts | 36.56 kB | N/A |
| sint32x4 from typegpudata.ts | 36.56 kB | N/A |
| sint8 from typegpudata.ts | 36.56 kB | N/A |
| sint8x2 from typegpudata.ts | 36.56 kB | N/A |
| sint8x4 from typegpudata.ts | 36.56 kB | N/A |
| sizeOf from typegpudata.ts | 40.29 kB | N/A |
| size from typegpudata.ts | 41.96 kB | N/A |
| smoothstep from typegpustd.ts | 79.52 kB | N/A |
| snorm16 from typegpudata.ts | 36.56 kB | N/A |
| snorm16x2 from typegpudata.ts | 36.56 kB | N/A |
| snorm16x4 from typegpudata.ts | 36.56 kB | N/A |
| snorm8 from typegpudata.ts | 36.56 kB | N/A |
| snorm8x2 from typegpudata.ts | 36.56 kB | N/A |
| snorm8x4 from typegpudata.ts | 36.56 kB | N/A |
| sqrt from typegpustd.ts | 79.52 kB | N/A |
| step from typegpustd.ts | 79.52 kB | N/A |
| storageBarrier from typegpustd.ts | 12.33 kB | N/A |
| struct from typegpudata.ts | 39.17 kB | N/A |
| sub from typegpustd.ts | 61.97 kB | N/A |
| subgroupAdd from typegpustd.ts | 39.28 kB | N/A |
| subgroupAll from typegpustd.ts | 39.29 kB | N/A |
| subgroupAnd from typegpustd.ts | 39.29 kB | N/A |
| subgroupAny from typegpustd.ts | 39.29 kB | N/A |
| subgroupBallot from typegpustd.ts | 39.29 kB | N/A |
| subgroupBroadcastFirst from typegpustd.ts | 39.29 kB | N/A |
| subgroupBroadcast from typegpustd.ts | 39.29 kB | N/A |
| subgroupElect from typegpustd.ts | 39.29 kB | N/A |
| subgroupExclusiveAdd from typegpustd.ts | 39.29 kB | N/A |
| subgroupExclusiveMul from typegpustd.ts | 39.29 kB | N/A |
| subgroupInclusiveAdd from typegpustd.ts | 39.29 kB | N/A |
| subgroupInclusiveMul from typegpustd.ts | 39.29 kB | N/A |
| subgroupMax from typegpustd.ts | 39.29 kB | N/A |
| subgroupMin from typegpustd.ts | 39.29 kB | N/A |
| subgroupMul from typegpustd.ts | 39.29 kB | N/A |
| subgroupOr from typegpustd.ts | 39.29 kB | N/A |
| subgroupShuffleDown from typegpustd.ts | 39.29 kB | N/A |
| subgroupShuffleUp from typegpustd.ts | 39.29 kB | N/A |
| subgroupShuffleXor from typegpustd.ts | 39.29 kB | N/A |
| subgroupShuffle from typegpustd.ts | 39.29 kB | N/A |
| subgroupXor from typegpustd.ts | 39.29 kB | N/A |
| tan from typegpustd.ts | 79.52 kB | N/A |
| tanh from typegpustd.ts | 79.52 kB | N/A |
| texture1d from typegpudata.ts | 10.82 kB | N/A |
| texture2dArray from typegpudata.ts | 10.84 kB | N/A |
| texture2d from typegpudata.ts | 10.82 kB | N/A |
| texture3d from typegpudata.ts | 10.82 kB | N/A |
| textureBarrier from typegpustd.ts | 12.33 kB | N/A |
| textureCubeArray from typegpudata.ts | 10.84 kB | N/A |
| textureCube from typegpudata.ts | 10.82 kB | N/A |
| textureDepth2dArray from typegpudata.ts | 10.83 kB | N/A |
| textureDepth2d from typegpudata.ts | 10.81 kB | N/A |
| textureDepthCubeArray from typegpudata.ts | 10.83 kB | N/A |
| textureDepthCube from typegpudata.ts | 10.81 kB | N/A |
| textureDepthMultisampled2d from typegpudata.ts | 10.83 kB | N/A |
| textureDimensions from typegpustd.ts | 39.91 kB | N/A |
| textureExternal from typegpudata.ts | 749 B | N/A |
| textureLoad from typegpustd.ts | 39.91 kB | N/A |
| textureMultisampled2d from typegpudata.ts | 10.84 kB | N/A |
| textureSampleBaseClampToEdge from typegpustd.ts | 39.91 kB | N/A |
| textureSampleBias from typegpustd.ts | 39.91 kB | N/A |
| textureSampleCompare from typegpustd.ts | 39.91 kB | N/A |
| textureSampleLevel from typegpustd.ts | 39.91 kB | N/A |
| textureSample from typegpustd.ts | 39.91 kB | N/A |
| textureStorage1d from typegpudata.ts | 913 B | N/A |
| textureStorage2dArray from typegpudata.ts | 931 B | N/A |
| textureStorage2d from typegpudata.ts | 913 B | N/A |
| textureStorage3d from typegpudata.ts | 913 B | N/A |
| textureStore from typegpustd.ts | 39.91 kB | N/A |
| tgpu.bindGroupLayout from typegpu.ts | 237.76 kB | N/A |
| tgpu.const from typegpu.ts | 237.75 kB | N/A |
| tgpu.fn from typegpu.ts | 237.75 kB | N/A |
| tgpu.initFromDevice from typegpu.ts | 237.76 kB | N/A |
| tgpu.init from typegpu.ts | 237.75 kB | N/A |
| tgpu.privateVar from typegpu.ts | 237.75 kB | N/A |
| tgpu.resolveWithContext from typegpu.ts | 237.76 kB | N/A |
| tgpu.resolve from typegpu.ts | 237.75 kB | N/A |
| tgpu.slot from typegpu.ts | 237.75 kB | N/A |
| tgpu.vertexLayout from typegpu.ts | 237.76 kB | N/A |
| tgpu.workgroupVar from typegpu.ts | 237.76 kB | N/A |
| tgpu from typegpu.ts | 237.74 kB | N/A |
| translate4 from typegpustd.ts | 62.76 kB | N/A |
| translation4 from typegpustd.ts | 42.86 kB | N/A |
| transpose from typegpustd.ts | 79.52 kB | N/A |
| trunc from typegpustd.ts | 79.52 kB | N/A |
| u16 from typegpudata.ts | 10.39 kB | N/A |
| u32 from typegpudata.ts | 10.36 kB | N/A |
| uint16 from typegpudata.ts | 36.56 kB | N/A |
| uint16x2 from typegpudata.ts | 36.56 kB | N/A |
| uint16x4 from typegpudata.ts | 36.56 kB | N/A |
| uint32 from typegpudata.ts | 36.56 kB | N/A |
| uint32x2 from typegpudata.ts | 36.56 kB | N/A |
| uint32x3 from typegpudata.ts | 36.56 kB | N/A |
| uint32x4 from typegpudata.ts | 36.56 kB | N/A |
| uint8 from typegpudata.ts | 36.56 kB | N/A |
| uint8x2 from typegpudata.ts | 36.56 kB | N/A |
| uint8x4 from typegpudata.ts | 36.56 kB | N/A |
| unorm10 10 10 2 from typegpudata.ts | 36.56 kB | N/A |
| unorm16 from typegpudata.ts | 36.56 kB | N/A |
| unorm16x2 from typegpudata.ts | 36.56 kB | N/A |
| unorm16x4 from typegpudata.ts | 36.56 kB | N/A |
| unorm8 from typegpudata.ts | 36.56 kB | N/A |
| unorm8x2 from typegpudata.ts | 36.56 kB | N/A |
| unorm8x4 bgra from typegpudata.ts | 36.56 kB | N/A |
| unorm8x4 from typegpudata.ts | 36.56 kB | N/A |
| unpack2x16float from typegpustd.ts | 51.30 kB | N/A |
| unpack4x8unorm from typegpustd.ts | 51.30 kB | N/A |
| unstruct from typegpudata.ts | 37.43 kB | N/A |
| vec2b from typegpudata.ts | 35.80 kB | N/A |
| vec2f from typegpudata.ts | 35.80 kB | N/A |
| vec2h from typegpudata.ts | 35.80 kB | N/A |
| vec2i from typegpudata.ts | 35.80 kB | N/A |
| vec2u from typegpudata.ts | 35.80 kB | N/A |
| vec3b from typegpudata.ts | 35.80 kB | N/A |
| vec3f from typegpudata.ts | 35.80 kB | N/A |
| vec3h from typegpudata.ts | 35.80 kB | N/A |
| vec3i from typegpudata.ts | 35.80 kB | N/A |
| vec3u from typegpudata.ts | 35.80 kB | N/A |
| vec4b from typegpudata.ts | 35.80 kB | N/A |
| vec4f from typegpudata.ts | 35.80 kB | N/A |
| vec4h from typegpudata.ts | 35.80 kB | N/A |
| vec4i from typegpudata.ts | 35.80 kB | N/A |
| vec4u from typegpudata.ts | 35.80 kB | N/A |
| workgroupBarrier from typegpustd.ts | 12.33 kB | N/A |
📋 All results
Click to reveal the results table (323 entries).
| Test | tsdown | webpack |
|---|---|---|
| dataImportEverything.ts | 80.03 kB (➖) | N/A |
| dataImportOneDirect.ts | 40.28 kB (➖) | N/A |
| dataImportOneStar.ts | 40.28 kB (➖) | N/A |
| functionWithUseGpu.ts | 268 B (➖) | N/A |
| functionWithoutUseGpu.ts | 24 B (➖) | N/A |
| importEntireLibrary.ts | 256.73 kB (➖) | N/A |
| stdImportEverything.ts | 113.10 kB (➖) | N/A |
| stdImportOneDirect.ts | 61.97 kB (➖) | N/A |
| stdImportOneStar.ts | 61.97 kB (➖) | N/A |
| tgpuImportEverything.ts | 237.74 kB (➖) | N/A |
| tgpuImportOne.ts | 237.75 kB (➖) | N/A |
| MissingBindGroupsError from typegpu.ts | 1.06 kB | N/A |
| MissingLinksError from typegpu.ts | 208 B | N/A |
| MissingSlotValueError from typegpu.ts | 153 B | N/A |
| MissingVertexBuffersError from typegpu.ts | 1.07 kB | N/A |
| NotUniformError from typegpu.ts | 1.02 kB | N/A |
| ResolutionError from typegpu.ts | 1.26 kB | N/A |
| Void from typegpudata.ts | 610 B | N/A |
| abs from typegpustd.ts | 79.52 kB | N/A |
| acos from typegpustd.ts | 79.52 kB | N/A |
| acosh from typegpustd.ts | 79.52 kB | N/A |
| add from typegpustd.ts | 61.97 kB | N/A |
| align from typegpudata.ts | 41.96 kB | N/A |
| alignmentOf from typegpudata.ts | 38.37 kB | N/A |
| allEq from typegpustd.ts | 64.32 kB | N/A |
| all from typegpustd.ts | 64.32 kB | N/A |
| and from typegpustd.ts | 64.32 kB | N/A |
| any from typegpustd.ts | 64.33 kB | N/A |
| arrayLength from typegpustd.ts | 10.82 kB | N/A |
| arrayOf from typegpudata.ts | 42.41 kB | N/A |
| asin from typegpustd.ts | 79.52 kB | N/A |
| asinh from typegpustd.ts | 79.52 kB | N/A |
| atan2 from typegpustd.ts | 79.52 kB | N/A |
| atan from typegpustd.ts | 79.52 kB | N/A |
| atanh from typegpustd.ts | 79.52 kB | N/A |
| atomicAdd from typegpustd.ts | 12.33 kB | N/A |
| atomicAnd from typegpustd.ts | 12.33 kB | N/A |
| atomicLoad from typegpustd.ts | 12.32 kB | N/A |
| atomicMax from typegpustd.ts | 12.33 kB | N/A |
| atomicMin from typegpustd.ts | 12.33 kB | N/A |
| atomicOr from typegpustd.ts | 12.33 kB | N/A |
| atomicStore from typegpustd.ts | 12.33 kB | N/A |
| atomicSub from typegpustd.ts | 12.33 kB | N/A |
| atomicXor from typegpustd.ts | 12.33 kB | N/A |
| atomic from typegpudata.ts | 649 B | N/A |
| bitcastU32toF32 from typegpustd.ts | 59.73 kB | N/A |
| bitcastU32toI32 from typegpustd.ts | 59.74 kB | N/A |
| bool from typegpudata.ts | 10.36 kB | N/A |
| builtin from typegpudata.ts | 44.77 kB | N/A |
| ceil from typegpustd.ts | 79.52 kB | N/A |
| clamp from typegpustd.ts | 79.52 kB | N/A |
| comparisonSampler from typegpudata.ts | 629 B | N/A |
| cos from typegpustd.ts | 79.52 kB | N/A |
| cosh from typegpustd.ts | 79.52 kB | N/A |
| countLeadingZeros from typegpustd.ts | 79.52 kB | N/A |
| countOneBits from typegpustd.ts | 79.52 kB | N/A |
| countTrailingZeros from typegpustd.ts | 79.52 kB | N/A |
| cross from typegpustd.ts | 79.52 kB | N/A |
| deepEqual from typegpudata.ts | 2.49 kB | N/A |
| degrees from typegpustd.ts | 79.52 kB | N/A |
| determinant from typegpustd.ts | 79.52 kB | N/A |
| disarrayOf from typegpudata.ts | 39.17 kB | N/A |
| discard from typegpustd.ts | 8.97 kB | N/A |
| distance from typegpustd.ts | 79.52 kB | N/A |
| div from typegpustd.ts | 61.97 kB | N/A |
| dot4I8Packed from typegpustd.ts | 79.52 kB | N/A |
| dot4U8Packed from typegpustd.ts | 79.52 kB | N/A |
| dot from typegpustd.ts | 79.51 kB | N/A |
| dpdxCoarse from typegpustd.ts | 9.77 kB | N/A |
| dpdxFine from typegpustd.ts | 9.77 kB | N/A |
| dpdx from typegpustd.ts | 9.77 kB | N/A |
| dpdyCoarse from typegpustd.ts | 9.77 kB | N/A |
| dpdyFine from typegpustd.ts | 9.77 kB | N/A |
| dpdy from typegpustd.ts | 9.77 kB | N/A |
| eq from typegpustd.ts | 64.32 kB | N/A |
| exp2 from typegpustd.ts | 79.52 kB | N/A |
| exp from typegpustd.ts | 79.52 kB | N/A |
| extensionEnabled from typegpustd.ts | 12.03 kB | N/A |
| extractBits from typegpustd.ts | 79.52 kB | N/A |
| f16 from typegpudata.ts | 10.36 kB | N/A |
| f32 from typegpudata.ts | 10.36 kB | N/A |
| faceForward from typegpustd.ts | 79.52 kB | N/A |
| firstLeadingBit from typegpustd.ts | 79.52 kB | N/A |
| firstTrailingBit from typegpustd.ts | 79.52 kB | N/A |
| float16 from typegpudata.ts | 36.56 kB | N/A |
| float16x2 from typegpudata.ts | 36.56 kB | N/A |
| float16x4 from typegpudata.ts | 36.56 kB | N/A |
| float32 from typegpudata.ts | 36.56 kB | N/A |
| float32x2 from typegpudata.ts | 36.56 kB | N/A |
| float32x3 from typegpudata.ts | 36.56 kB | N/A |
| float32x4 from typegpudata.ts | 36.56 kB | N/A |
| floor from typegpustd.ts | 79.52 kB | N/A |
| fma from typegpustd.ts | 79.52 kB | N/A |
| formatToWGSLType from typegpudata.ts | 37.08 kB | N/A |
| fract from typegpustd.ts | 79.52 kB | N/A |
| frexp from typegpustd.ts | 79.52 kB | N/A |
| fwidthCoarse from typegpustd.ts | 9.77 kB | N/A |
| fwidthFine from typegpustd.ts | 9.77 kB | N/A |
| fwidth from typegpustd.ts | 9.77 kB | N/A |
| ge from typegpustd.ts | 64.32 kB | N/A |
| gt from typegpustd.ts | 64.33 kB | N/A |
| i32 from typegpudata.ts | 10.36 kB | N/A |
| identity2 from typegpustd.ts | 42.86 kB | N/A |
| identity3 from typegpustd.ts | 42.86 kB | N/A |
| identity4 from typegpustd.ts | 42.86 kB | N/A |
| insertBits from typegpustd.ts | 79.52 kB | N/A |
| interpolate from typegpudata.ts | 41.96 kB | N/A |
| invariant from typegpudata.ts | 42.33 kB | N/A |
| inverseSqrt from typegpustd.ts | 79.52 kB | N/A |
| isAlignAttrib from typegpudata.ts | 631 B | N/A |
| isAtomic from typegpudata.ts | 631 B | N/A |
| isBufferShorthand from typegpu.ts | 1.39 kB | N/A |
| isBuffer from typegpu.ts | 96.76 kB | N/A |
| isBuiltinAttrib from typegpudata.ts | 633 B | N/A |
| isBuiltin from typegpudata.ts | 40.37 kB | N/A |
| isCloseTo from typegpustd.ts | 64.33 kB | N/A |
| isComparisonSampler from typegpu.ts | 64.03 kB | N/A |
| isData from typegpudata.ts | 2.10 kB | N/A |
| isDecorated from typegpudata.ts | 634 B | N/A |
| isDerived from typegpu.ts | 71 B | N/A |
| isDisarray from typegpudata.ts | 1.40 kB | N/A |
| isInterpolateAttrib from typegpudata.ts | 637 B | N/A |
| isLocationAttrib from typegpudata.ts | 634 B | N/A |
| isLooseData from typegpudata.ts | 1.44 kB | N/A |
| isLooseDecorated from typegpudata.ts | 1.41 kB | N/A |
| isPackedData from typegpudata.ts | 37.15 kB | N/A |
| isPtr from typegpudata.ts | 628 B | N/A |
| isSampler from typegpu.ts | 64.02 kB | N/A |
| isSizeAttrib from typegpudata.ts | 630 B | N/A |
| isSlot from typegpu.ts | 68 B | N/A |
| isTexture from typegpu.ts | 64.01 kB | N/A |
| isTgpuFn from typegpu.ts | 641 B | N/A |
| isUnstruct from typegpudata.ts | 1.40 kB | N/A |
| isUsableAsRender from typegpu.ts | 62 B | N/A |
| isUsableAsSampled from typegpu.ts | 63 B | N/A |
| isUsableAsStorage from typegpu.ts | 63 B | N/A |
| isUsableAsUniform from typegpu.ts | 64.77 kB | N/A |
| isUsableAsVertex from typegpu.ts | 96.76 kB | N/A |
| isVariable from typegpu.ts | 65.76 kB | N/A |
| isWgslArray from typegpudata.ts | 630 B | N/A |
| isWgslData from typegpudata.ts | 1.19 kB | N/A |
| isWgslStruct from typegpudata.ts | 631 B | N/A |
| ldexp from typegpustd.ts | 79.52 kB | N/A |
| le from typegpustd.ts | 64.33 kB | N/A |
| length from typegpustd.ts | 79.51 kB | N/A |
| location from typegpudata.ts | 41.96 kB | N/A |
| log2 from typegpustd.ts | 79.52 kB | N/A |
| log from typegpustd.ts | 79.52 kB | N/A |
| lt from typegpustd.ts | 64.32 kB | N/A |
| mat2x2f from typegpudata.ts | 42.86 kB | N/A |
| mat3x3f from typegpudata.ts | 42.86 kB | N/A |
| mat4x4f from typegpudata.ts | 42.85 kB | N/A |
| matToArray from typegpudata.ts | 42.99 kB | N/A |
| max from typegpustd.ts | 79.52 kB | N/A |
| min from typegpustd.ts | 79.52 kB | N/A |
| mix from typegpustd.ts | 79.52 kB | N/A |
| mod from typegpustd.ts | 61.97 kB | N/A |
| modf from typegpustd.ts | 79.52 kB | N/A |
| mul from typegpustd.ts | 61.97 kB | N/A |
| ne from typegpustd.ts | 64.32 kB | N/A |
| neg from typegpustd.ts | 61.97 kB | N/A |
| normalize from typegpustd.ts | 79.52 kB | N/A |
| not from typegpustd.ts | 64.32 kB | N/A |
| or from typegpustd.ts | 64.32 kB | N/A |
| pack2x16float from typegpustd.ts | 51.30 kB | N/A |
| pack4x8unorm from typegpustd.ts | 51.30 kB | N/A |
| packedFormats from typegpudata.ts | 37.11 kB | N/A |
| pow from typegpustd.ts | 79.52 kB | N/A |
| ptrFn from typegpudata.ts | 735 B | N/A |
| ptrHandle from typegpudata.ts | 727 B | N/A |
| ptrPrivate from typegpudata.ts | 734 B | N/A |
| ptrStorage from typegpudata.ts | 732 B | N/A |
| ptrUniform from typegpudata.ts | 728 B | N/A |
| ptrWorkgroup from typegpudata.ts | 736 B | N/A |
| quantizeToF16 from typegpustd.ts | 79.52 kB | N/A |
| radians from typegpustd.ts | 79.52 kB | N/A |
| ref from typegpudata.ts | 3.73 kB | N/A |
| reflect from typegpustd.ts | 79.52 kB | N/A |
| refract from typegpustd.ts | 79.52 kB | N/A |
| reverseBits from typegpustd.ts | 79.52 kB | N/A |
| rotateX4 from typegpustd.ts | 62.76 kB | N/A |
| rotateY4 from typegpustd.ts | 62.76 kB | N/A |
| rotateZ4 from typegpustd.ts | 62.76 kB | N/A |
| rotationX4 from typegpustd.ts | 42.86 kB | N/A |
| rotationY4 from typegpustd.ts | 42.86 kB | N/A |
| rotationZ4 from typegpustd.ts | 42.86 kB | N/A |
| round from typegpustd.ts | 79.52 kB | N/A |
| sampler from typegpudata.ts | 618 B | N/A |
| saturate from typegpustd.ts | 79.52 kB | N/A |
| scale4 from typegpustd.ts | 62.76 kB | N/A |
| scaling4 from typegpustd.ts | 42.86 kB | N/A |
| select from typegpustd.ts | 64.33 kB | N/A |
| sign from typegpustd.ts | 79.52 kB | N/A |
| sin from typegpustd.ts | 79.52 kB | N/A |
| sinh from typegpustd.ts | 79.52 kB | N/A |
| sint16 from typegpudata.ts | 36.56 kB | N/A |
| sint16x2 from typegpudata.ts | 36.56 kB | N/A |
| sint16x4 from typegpudata.ts | 36.56 kB | N/A |
| sint32 from typegpudata.ts | 36.56 kB | N/A |
| sint32x2 from typegpudata.ts | 36.56 kB | N/A |
| sint32x3 from typegpudata.ts | 36.56 kB | N/A |
| sint32x4 from typegpudata.ts | 36.56 kB | N/A |
| sint8 from typegpudata.ts | 36.56 kB | N/A |
| sint8x2 from typegpudata.ts | 36.56 kB | N/A |
| sint8x4 from typegpudata.ts | 36.56 kB | N/A |
| sizeOf from typegpudata.ts | 40.29 kB | N/A |
| size from typegpudata.ts | 41.96 kB | N/A |
| smoothstep from typegpustd.ts | 79.52 kB | N/A |
| snorm16 from typegpudata.ts | 36.56 kB | N/A |
| snorm16x2 from typegpudata.ts | 36.56 kB | N/A |
| snorm16x4 from typegpudata.ts | 36.56 kB | N/A |
| snorm8 from typegpudata.ts | 36.56 kB | N/A |
| snorm8x2 from typegpudata.ts | 36.56 kB | N/A |
| snorm8x4 from typegpudata.ts | 36.56 kB | N/A |
| sqrt from typegpustd.ts | 79.52 kB | N/A |
| step from typegpustd.ts | 79.52 kB | N/A |
| storageBarrier from typegpustd.ts | 12.33 kB | N/A |
| struct from typegpudata.ts | 39.17 kB | N/A |
| sub from typegpustd.ts | 61.97 kB | N/A |
| subgroupAdd from typegpustd.ts | 39.28 kB | N/A |
| subgroupAll from typegpustd.ts | 39.29 kB | N/A |
| subgroupAnd from typegpustd.ts | 39.29 kB | N/A |
| subgroupAny from typegpustd.ts | 39.29 kB | N/A |
| subgroupBallot from typegpustd.ts | 39.29 kB | N/A |
| subgroupBroadcastFirst from typegpustd.ts | 39.29 kB | N/A |
| subgroupBroadcast from typegpustd.ts | 39.29 kB | N/A |
| subgroupElect from typegpustd.ts | 39.29 kB | N/A |
| subgroupExclusiveAdd from typegpustd.ts | 39.29 kB | N/A |
| subgroupExclusiveMul from typegpustd.ts | 39.29 kB | N/A |
| subgroupInclusiveAdd from typegpustd.ts | 39.29 kB | N/A |
| subgroupInclusiveMul from typegpustd.ts | 39.29 kB | N/A |
| subgroupMax from typegpustd.ts | 39.29 kB | N/A |
| subgroupMin from typegpustd.ts | 39.29 kB | N/A |
| subgroupMul from typegpustd.ts | 39.29 kB | N/A |
| subgroupOr from typegpustd.ts | 39.29 kB | N/A |
| subgroupShuffleDown from typegpustd.ts | 39.29 kB | N/A |
| subgroupShuffleUp from typegpustd.ts | 39.29 kB | N/A |
| subgroupShuffleXor from typegpustd.ts | 39.29 kB | N/A |
| subgroupShuffle from typegpustd.ts | 39.29 kB | N/A |
| subgroupXor from typegpustd.ts | 39.29 kB | N/A |
| tan from typegpustd.ts | 79.52 kB | N/A |
| tanh from typegpustd.ts | 79.52 kB | N/A |
| texture1d from typegpudata.ts | 10.82 kB | N/A |
| texture2dArray from typegpudata.ts | 10.84 kB | N/A |
| texture2d from typegpudata.ts | 10.82 kB | N/A |
| texture3d from typegpudata.ts | 10.82 kB | N/A |
| textureBarrier from typegpustd.ts | 12.33 kB | N/A |
| textureCubeArray from typegpudata.ts | 10.84 kB | N/A |
| textureCube from typegpudata.ts | 10.82 kB | N/A |
| textureDepth2dArray from typegpudata.ts | 10.83 kB | N/A |
| textureDepth2d from typegpudata.ts | 10.81 kB | N/A |
| textureDepthCubeArray from typegpudata.ts | 10.83 kB | N/A |
| textureDepthCube from typegpudata.ts | 10.81 kB | N/A |
| textureDepthMultisampled2d from typegpudata.ts | 10.83 kB | N/A |
| textureDimensions from typegpustd.ts | 39.91 kB | N/A |
| textureExternal from typegpudata.ts | 749 B | N/A |
| textureLoad from typegpustd.ts | 39.91 kB | N/A |
| textureMultisampled2d from typegpudata.ts | 10.84 kB | N/A |
| textureSampleBaseClampToEdge from typegpustd.ts | 39.91 kB | N/A |
| textureSampleBias from typegpustd.ts | 39.91 kB | N/A |
| textureSampleCompare from typegpustd.ts | 39.91 kB | N/A |
| textureSampleLevel from typegpustd.ts | 39.91 kB | N/A |
| textureSample from typegpustd.ts | 39.91 kB | N/A |
| textureStorage1d from typegpudata.ts | 913 B | N/A |
| textureStorage2dArray from typegpudata.ts | 931 B | N/A |
| textureStorage2d from typegpudata.ts | 913 B | N/A |
| textureStorage3d from typegpudata.ts | 913 B | N/A |
| textureStore from typegpustd.ts | 39.91 kB | N/A |
| tgpu.bindGroupLayout from typegpu.ts | 237.76 kB | N/A |
| tgpu.const from typegpu.ts | 237.75 kB | N/A |
| tgpu.fn from typegpu.ts | 237.75 kB | N/A |
| tgpu.initFromDevice from typegpu.ts | 237.76 kB | N/A |
| tgpu.init from typegpu.ts | 237.75 kB | N/A |
| tgpu.privateVar from typegpu.ts | 237.75 kB | N/A |
| tgpu.resolveWithContext from typegpu.ts | 237.76 kB | N/A |
| tgpu.resolve from typegpu.ts | 237.75 kB | N/A |
| tgpu.slot from typegpu.ts | 237.75 kB | N/A |
| tgpu.vertexLayout from typegpu.ts | 237.76 kB | N/A |
| tgpu.workgroupVar from typegpu.ts | 237.76 kB | N/A |
| tgpu from typegpu.ts | 237.74 kB | N/A |
| translate4 from typegpustd.ts | 62.76 kB | N/A |
| translation4 from typegpustd.ts | 42.86 kB | N/A |
| transpose from typegpustd.ts | 79.52 kB | N/A |
| trunc from typegpustd.ts | 79.52 kB | N/A |
| u16 from typegpudata.ts | 10.39 kB | N/A |
| u32 from typegpudata.ts | 10.36 kB | N/A |
| uint16 from typegpudata.ts | 36.56 kB | N/A |
| uint16x2 from typegpudata.ts | 36.56 kB | N/A |
| uint16x4 from typegpudata.ts | 36.56 kB | N/A |
| uint32 from typegpudata.ts | 36.56 kB | N/A |
| uint32x2 from typegpudata.ts | 36.56 kB | N/A |
| uint32x3 from typegpudata.ts | 36.56 kB | N/A |
| uint32x4 from typegpudata.ts | 36.56 kB | N/A |
| uint8 from typegpudata.ts | 36.56 kB | N/A |
| uint8x2 from typegpudata.ts | 36.56 kB | N/A |
| uint8x4 from typegpudata.ts | 36.56 kB | N/A |
| unorm10 10 10 2 from typegpudata.ts | 36.56 kB | N/A |
| unorm16 from typegpudata.ts | 36.56 kB | N/A |
| unorm16x2 from typegpudata.ts | 36.56 kB | N/A |
| unorm16x4 from typegpudata.ts | 36.56 kB | N/A |
| unorm8 from typegpudata.ts | 36.56 kB | N/A |
| unorm8x2 from typegpudata.ts | 36.56 kB | N/A |
| unorm8x4 bgra from typegpudata.ts | 36.56 kB | N/A |
| unorm8x4 from typegpudata.ts | 36.56 kB | N/A |
| unpack2x16float from typegpustd.ts | 51.30 kB | N/A |
| unpack4x8unorm from typegpustd.ts | 51.30 kB | N/A |
| unstruct from typegpudata.ts | 37.43 kB | N/A |
| vec2b from typegpudata.ts | 35.80 kB | N/A |
| vec2f from typegpudata.ts | 35.80 kB | N/A |
| vec2h from typegpudata.ts | 35.80 kB | N/A |
| vec2i from typegpudata.ts | 35.80 kB | N/A |
| vec2u from typegpudata.ts | 35.80 kB | N/A |
| vec3b from typegpudata.ts | 35.80 kB | N/A |
| vec3f from typegpudata.ts | 35.80 kB | N/A |
| vec3h from typegpudata.ts | 35.80 kB | N/A |
| vec3i from typegpudata.ts | 35.80 kB | N/A |
| vec3u from typegpudata.ts | 35.80 kB | N/A |
| vec4b from typegpudata.ts | 35.80 kB | N/A |
| vec4f from typegpudata.ts | 35.80 kB | N/A |
| vec4h from typegpudata.ts | 35.80 kB | N/A |
| vec4i from typegpudata.ts | 35.80 kB | N/A |
| vec4u from typegpudata.ts | 35.80 kB | N/A |
| workgroupBarrier from typegpustd.ts | 12.33 kB | N/A |
|
It should be possible for files to be virtual, not committed to the file system. Also, in case you haven't yet thought about displaying the data concisely, maybe we should default to only showing outstanding differences in values (above a certain threshold)? That way we won't be desensitized to these messages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the treeshake testing infrastructure by adding dynamic test generation for TypeGPU entry points. It generates import tests for all exports from typegpu, typegpu/data, and typegpu/std packages, and updates the CI workflow to support both automated PR runs (with only tsdown) and manual workflow dispatch runs (with both tsdown and webpack).
Changes:
- Added
generateTests.tsscript to dynamically generate import tests for all TypeGPU exports - Refactored test execution into
runTests.tswith configurable bundler selection - Created
ResultsTableclass to format comparison results with "interesting" and "all results" tables - Modified CI workflow to support manual runs with webpack and automatic PR runs with only tsdown
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/treeshake-test/generateTests.ts | New script that iterates over TypeGPU exports and generates test files for each |
| apps/treeshake-test/runTests.ts | Refactored main test runner with command-line bundler selection |
| apps/treeshake-test/resultsTable.ts | New class for formatting comparison tables with filtering logic |
| apps/treeshake-test/compareResults.ts | Updated to use ResultsTable class and separate static/dynamic test results |
| apps/treeshake-test/bundleWith.ts | Minor import reordering (alphabetical) |
| apps/treeshake-test/package.json | Added generate-tests script and tsx dependency |
| apps/treeshake-test/.gitignore | Added pattern to ignore generated dynamic test files |
| .github/workflows/treeshake-test.yml | Added workflow_dispatch support and conditional bundler execution |
| pnpm-lock.yaml | Updated tsx dependency to use newer get-tsconfig version |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
apps/treeshake-test/compareResults.ts:97
- The "Increased" column is displaying the wrong value. It shows
totalUnchangedwhen it should showtotalIncreased. This will cause the summary table to display incorrect statistics.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| "type": "module", | ||
| "scripts": { | ||
| "test": "node index.ts" | ||
| "generate-tests": "tsx generateTests.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was failing when using plain node?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generateTests.ts needs workspace typegpu import to know what exports to generate tests for. And in typegpu, we use typescript syntax unsupported by node
SyntaxError [ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX]: x TypeScript parameter property is not supported in strip-only mode
,-[49:1]
46 | 'Vertex formats are not host-shareable, use concrete types instead';
47 | // ---
48 |
49 | constructor(public readonly type: T) {}
: ^^^^^^^
50 | }
51 |
52 | export const formatToWGSLType = {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aah, I see. It's okay then.
iwoplaza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MERGE
Changes:
generate-tests.tsscript in thetreeshake-testdirectory, that iterates over exports fromtypegpu,typegpu/dataandtypegpu/std, and generates an import test for each,generate-tests.ts,webpackby default, so now onlytsdownruns on CI (becausetsdowntakes 10 seconds, andwebpacktakes 6 minutes),treeshake-testrunnable from the Actions menu (generates a summary instead of a comment, and runswebpackas well),The .yaml must be on main branch for the "Run workflow" button to become visible, I tested it on a repo fork.