Skip to content

feat: Abstract vectors - #3035

Draft
iwoplaza wants to merge 2 commits into
mainfrom
feat/abstract-vectors
Draft

iwoplaza wants to merge 2 commits into
mainfrom
feat/abstract-vectors

Conversation

@iwoplaza

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions

github-actions Bot commented Sep 16, 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/eslint-plugin-typegpu@f18e136aaea38d77518d8b65ed7ce1b8cc743dd9
https://pkg.pr.new/software-mansion/TypeGPU/tinyest@f18e136aaea38d77518d8b65ed7ce1b8cc743dd9
https://pkg.pr.new/software-mansion/TypeGPU/tinyest-for-wgsl@f18e136aaea38d77518d8b65ed7ce1b8cc743dd9
https://pkg.pr.new/software-mansion/TypeGPU/typegpu@f18e136aaea38d77518d8b65ed7ce1b8cc743dd9
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/gl@f18e136aaea38d77518d8b65ed7ce1b8cc743dd9
https://pkg.pr.new/software-mansion/TypeGPU/unplugin-typegpu@f18e136aaea38d77518d8b65ed7ce1b8cc743dd9

benchmark
view benchmark

commit
view commit

@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown

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

🟢 Decreased ➖ Unchanged 🔴 Increased (max 16.19%) ❔ Unknown
0 37 288 3

import * as ... in PR vs import * as ... in target (did bundle size increase?):

Click to reveal the results table (290 entries).
Test tsdown
std_neg.ts 45.74 kB ($${\color{red}+16.2\%}$$)
std_add.ts 45.74 kB ($${\color{red}+16.2\%}$$)
std_bitShiftLeft.ts 45.74 kB ($${\color{red}+16.2\%}$$)
std_bitShiftRight.ts 45.74 kB ($${\color{red}+16.2\%}$$)
std_div.ts 45.74 kB ($${\color{red}+16.2\%}$$)
std_mod.ts 45.74 kB ($${\color{red}+16.2\%}$$)
std_mul.ts 45.74 kB ($${\color{red}+16.2\%}$$)
std_sub.ts 45.74 kB ($${\color{red}+16.2\%}$$)
std_rotateX4.ts 46.57 kB ($${\color{red}+15.9\%}$$)
std_scale4.ts 46.57 kB ($${\color{red}+15.9\%}$$)
std_translate4.ts 46.57 kB ($${\color{red}+15.9\%}$$)
std_rotateY4.ts 46.58 kB ($${\color{red}+15.8\%}$$)
std_rotateZ4.ts 46.58 kB ($${\color{red}+15.8\%}$$)
d_mat4x4f.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec2u.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec3b.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec3f.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec3u.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec4b.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec4u.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_mat2x2f.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_mat3x3f.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec2f.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec2h.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec2i.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec3h.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec3i.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec4f.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec4h.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec4i.ts 48.50 kB ($${\color{red}+15.4\%}$$)
d_vec2b.ts 48.50 kB ($${\color{red}+15.4\%}$$)
std_and.ts 43.88 kB ($${\color{red}+13.8\%}$$)
std_or.ts 43.88 kB ($${\color{red}+13.8\%}$$)
std_all.ts 43.89 kB ($${\color{red}+13.8\%}$$)
std_allEq.ts 43.89 kB ($${\color{red}+13.8\%}$$)
std_any.ts 43.89 kB ($${\color{red}+13.8\%}$$)
std_eq.ts 43.89 kB ($${\color{red}+13.8\%}$$)
std_lt.ts 43.89 kB ($${\color{red}+13.8\%}$$)
std_ne.ts 43.89 kB ($${\color{red}+13.8\%}$$)
std_not.ts 43.89 kB ($${\color{red}+13.8\%}$$)
std_select.ts 43.89 kB ($${\color{red}+13.8\%}$$)
std_ge.ts 43.90 kB ($${\color{red}+13.8\%}$$)
std_gt.ts 43.90 kB ($${\color{red}+13.8\%}$$)
std_isCloseTo.ts 43.90 kB ($${\color{red}+13.8\%}$$)
std_le.ts 43.90 kB ($${\color{red}+13.8\%}$$)
std_bitcastF32toU32.ts 41.96 kB ($${\color{red}+13.7\%}$$)
std_bitcastU32toF32.ts 41.97 kB ($${\color{red}+13.7\%}$$)
std_bitcastU32toI32.ts 41.97 kB ($${\color{red}+13.7\%}$$)
std_bitcast.ts 41.98 kB ($${\color{red}+13.7\%}$$)
std_dot.ts 65.51 kB ($${\color{red}+12.9\%}$$)
std_length.ts 65.51 kB ($${\color{red}+12.9\%}$$)
std_distance.ts 65.51 kB ($${\color{red}+12.9\%}$$)
std_dot4U8Packed.ts 65.51 kB ($${\color{red}+12.9\%}$$)
std_fract.ts 65.51 kB ($${\color{red}+12.9\%}$$)
std_frexp.ts 65.51 kB ($${\color{red}+12.9\%}$$)
std_mix.ts 65.51 kB ($${\color{red}+12.9\%}$$)
std_modf.ts 65.51 kB ($${\color{red}+12.9\%}$$)
std_abs.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_acos.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_acosh.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_asin.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_asinh.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_atan.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_atan2.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_atanh.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_ceil.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_clamp.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_cos.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_cosh.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_countLeadingZeros.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_countOneBits.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_countTrailingZeros.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_cross.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_degrees.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_determinant.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_dot4I8Packed.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_exp.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_exp2.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_extractBits.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_faceForward.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_firstLeadingBit.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_firstTrailingBit.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_floor.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_fma.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_insertBits.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_intdiv.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_inverseSqrt.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_ldexp.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_log.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_log2.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_max.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_min.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_normalize.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_pow.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_quantizeToF16.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_radians.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_reflect.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_refract.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_reverseBits.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_round.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_saturate.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_sign.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_sin.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_sinh.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_smoothstep.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_sqrt.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_step.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_tan.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_tanh.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_transpose.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_trunc.ts 65.52 kB ($${\color{red}+12.9\%}$$)
std_dpdx.ts 66.53 kB ($${\color{red}+12.7\%}$$)
std_dpdxCoarse.ts 66.53 kB ($${\color{red}+12.7\%}$$)
std_dpdxFine.ts 66.53 kB ($${\color{red}+12.7\%}$$)
std_dpdy.ts 66.53 kB ($${\color{red}+12.7\%}$$)
std_dpdyCoarse.ts 66.53 kB ($${\color{red}+12.7\%}$$)
std_dpdyFine.ts 66.53 kB ($${\color{red}+12.7\%}$$)
std_fwidth.ts 66.53 kB ($${\color{red}+12.7\%}$$)
std_fwidthCoarse.ts 66.53 kB ($${\color{red}+12.7\%}$$)
std_fwidthFine.ts 66.53 kB ($${\color{red}+12.7\%}$$)
tgpu_lazy.ts 62.76 kB ($${\color{red}+11.8\%}$$)
tgpu_const.ts 62.96 kB ($${\color{red}+11.7\%}$$)
tgpu_workgroupVar.ts 63.54 kB ($${\color{red}+11.6\%}$$)
tgpu_privateVar.ts 63.54 kB ($${\color{red}+11.6\%}$$)
tgpu_accessor.ts 64.85 kB ($${\color{red}+11.3\%}$$)
tgpu_mutableAccessor.ts 64.85 kB ($${\color{red}+11.3\%}$$)
tgpu_bindGroupLayout.ts 70.13 kB ($${\color{red}+10.4\%}$$)
STATIC_d.ts 85.57 kB ($${\color{red}+8.3\%}$$)
STATIC_std.ts 106.62 kB ($${\color{red}+7.6\%}$$)
tgpu_resolveWithContext.ts 172.14 kB ($${\color{red}+4.7\%}$$)
tgpu_resolve.ts 172.20 kB ($${\color{red}+4.7\%}$$)
tgpu_initFromDevice.ts 272.84 kB ($${\color{red}+2.9\%}$$)
tgpu_init.ts 273.38 kB ($${\color{red}+2.9\%}$$)
STATIC_tgpu.ts 282.91 kB ($${\color{red}+2.8\%}$$)
STATIC_allImports.ts 309.17 kB ($${\color{red}+2.7\%}$$)
d_formatToWGSLType.ts 23.12 kB ($${\color{red}+2.4\%}$$)
d_uint8.ts 23.12 kB ($${\color{red}+2.4\%}$$)
d_float16.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_float16x2.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_float16x4.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_float32.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_float32x2.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_float32x3.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_float32x4.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_sint16.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_sint16x2.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_sint16x4.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_sint32.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_sint32x2.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_sint32x3.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_sint32x4.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_sint8.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_sint8x2.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_sint8x4.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_snorm16.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_snorm16x2.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_snorm16x4.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_snorm8.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_snorm8x2.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_snorm8x4.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_uint16.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_uint16x2.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_uint16x4.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_uint32.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_uint32x2.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_uint32x3.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_uint32x4.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_uint8x2.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_uint8x4.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_unorm10_10_10_2.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_unorm16.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_unorm16x2.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_unorm16x4.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_unorm8.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_unorm8x2.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_unorm8x4.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_unorm8x4_bgra.ts 23.13 kB ($${\color{red}+2.4\%}$$)
d_packedFormats.ts 23.15 kB ($${\color{red}+2.4\%}$$)
d_isPackedData.ts 23.19 kB ($${\color{red}+2.4\%}$$)
d_alignmentOf.ts 24.07 kB ($${\color{red}+2.3\%}$$)
std_subgroupAdd.ts 26.60 kB ($${\color{red}+2.1\%}$$)
std_subgroupAll.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupAnd.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupAny.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupBallot.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupBroadcast.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupBroadcastFirst.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupElect.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupExclusiveAdd.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupExclusiveMul.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupInclusiveAdd.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupInclusiveMul.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupMax.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupMin.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupMul.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupOr.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupShuffle.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupShuffleDown.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupShuffleUp.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupShuffleXor.ts 26.61 kB ($${\color{red}+2.1\%}$$)
std_subgroupXor.ts 26.61 kB ($${\color{red}+2.1\%}$$)
d_isBuiltin.ts 26.80 kB ($${\color{red}+2.0\%}$$)
d_sizeOf.ts 26.85 kB ($${\color{red}+2.0\%}$$)
d_isContiguous.ts 26.86 kB ($${\color{red}+2.0\%}$$)
d_getLongestContiguousPrefix.ts 26.87 kB ($${\color{red}+2.0\%}$$)
std_textureDimensions.ts 28.34 kB ($${\color{red}+2.0\%}$$)
std_textureGather.ts 28.34 kB ($${\color{red}+2.0\%}$$)
std_textureLoad.ts 28.35 kB ($${\color{red}+2.0\%}$$)
std_textureSample.ts 28.35 kB ($${\color{red}+2.0\%}$$)
std_textureSampleBaseClampToEdge.ts 28.35 kB ($${\color{red}+2.0\%}$$)
std_textureSampleBias.ts 28.35 kB ($${\color{red}+2.0\%}$$)
std_textureSampleCompare.ts 28.35 kB ($${\color{red}+2.0\%}$$)
std_textureSampleCompareLevel.ts 28.35 kB ($${\color{red}+2.0\%}$$)
std_textureSampleGrad.ts 28.35 kB ($${\color{red}+2.0\%}$$)
std_textureSampleLevel.ts 28.35 kB ($${\color{red}+2.0\%}$$)
std_textureStore.ts 28.35 kB ($${\color{red}+2.0\%}$$)
d_size.ts 28.55 kB ($${\color{red}+1.9\%}$$)
d_align.ts 28.55 kB ($${\color{red}+1.9\%}$$)
d_location.ts 28.55 kB ($${\color{red}+1.9\%}$$)
d_interpolate.ts 28.55 kB ($${\color{red}+1.9\%}$$)
std_discard.ts 16.25 kB ($${\color{red}+1.9\%}$$)
d_matToArray.ts 29.40 kB ($${\color{red}+1.9\%}$$)
std_identity2.ts 29.27 kB ($${\color{red}+1.9\%}$$)
std_identity3.ts 29.27 kB ($${\color{red}+1.9\%}$$)
std_identity4.ts 29.27 kB ($${\color{red}+1.9\%}$$)
std_rotationX4.ts 29.27 kB ($${\color{red}+1.9\%}$$)
std_rotationY4.ts 29.27 kB ($${\color{red}+1.9\%}$$)
std_rotationZ4.ts 29.27 kB ($${\color{red}+1.9\%}$$)
std_scaling4.ts 29.27 kB ($${\color{red}+1.9\%}$$)
std_translation4.ts 29.27 kB ($${\color{red}+1.9\%}$$)
d_invariant.ts 28.92 kB ($${\color{red}+1.9\%}$$)
d_arrayOf.ts 28.53 kB ($${\color{red}+1.9\%}$$)
std_copy.ts 16.50 kB ($${\color{red}+1.9\%}$$)
std_arrayLength.ts 16.52 kB ($${\color{red}+1.9\%}$$)
tgpu_vertexLayout.ts 28.85 kB ($${\color{red}+1.9\%}$$)
d_builtin.ts 31.00 kB ($${\color{red}+1.8\%}$$)
std_atomicLoad.ts 18.02 kB ($${\color{red}+1.7\%}$$)
std_atomicStore.ts 18.03 kB ($${\color{red}+1.7\%}$$)
std_textureBarrier.ts 18.03 kB ($${\color{red}+1.7\%}$$)
std_atomicAdd.ts 18.03 kB ($${\color{red}+1.7\%}$$)
std_atomicAnd.ts 18.03 kB ($${\color{red}+1.7\%}$$)
std_atomicMax.ts 18.03 kB ($${\color{red}+1.7\%}$$)
std_atomicMin.ts 18.03 kB ($${\color{red}+1.7\%}$$)
std_atomicOr.ts 18.03 kB ($${\color{red}+1.7\%}$$)
std_atomicSub.ts 18.03 kB ($${\color{red}+1.7\%}$$)
std_atomicXor.ts 18.03 kB ($${\color{red}+1.7\%}$$)
std_storageBarrier.ts 18.03 kB ($${\color{red}+1.7\%}$$)
std_workgroupBarrier.ts 18.03 kB ($${\color{red}+1.7\%}$$)
std_pack2x16float.ts 38.36 kB ($${\color{red}+1.5\%}$$)
std_pack4x8unorm.ts 38.36 kB ($${\color{red}+1.5\%}$$)
std_unpack2x16float.ts 38.36 kB ($${\color{red}+1.5\%}$$)
std_unpack4x8unorm.ts 38.36 kB ($${\color{red}+1.5\%}$$)
tgpu_fn.ts 40.19 kB ($${\color{red}+1.4\%}$$)
tgpu_computeFn.ts 39.74 kB ($${\color{red}+1.4\%}$$)
tgpu_vertexFn.ts 40.04 kB ($${\color{red}+1.4\%}$$)
tgpu_fragmentFn.ts 40.22 kB ($${\color{red}+1.4\%}$$)
common_fullScreenTriangle.ts 42.85 kB ($${\color{red}+1.3\%}$$)
common_writeSoA.ts 43.41 kB ($${\color{red}+1.2\%}$$)
d_memoryLayoutOf.ts 44.17 kB ($${\color{red}+1.2\%}$$)
d_isWgslData.ts 1.35 kB ($${\color{red}+1.1\%}$$)
STATIC_common.ts 59.61 kB ($${\color{red}+0.9\%}$$)
d_isData.ts 1.85 kB ($${\color{red}+0.8\%}$$)
d_bool.ts 14.74 kB ($${\color{red}+0.7\%}$$)
d_f16.ts 14.74 kB ($${\color{red}+0.7\%}$$)
d_f32.ts 14.74 kB ($${\color{red}+0.7\%}$$)
d_i32.ts 14.74 kB ($${\color{red}+0.7\%}$$)
d_u32.ts 14.74 kB ($${\color{red}+0.7\%}$$)
d_u16.ts 14.76 kB ($${\color{red}+0.7\%}$$)
d_textureDepth2d.ts 15.18 kB ($${\color{red}+0.6\%}$$)
d_textureDepthCube.ts 15.19 kB ($${\color{red}+0.6\%}$$)
d_texture1d.ts 15.20 kB ($${\color{red}+0.6\%}$$)
d_texture2d.ts 15.20 kB ($${\color{red}+0.6\%}$$)
d_texture3d.ts 15.20 kB ($${\color{red}+0.6\%}$$)
d_textureCube.ts 15.20 kB ($${\color{red}+0.6\%}$$)
d_textureDepth2dArray.ts 15.20 kB ($${\color{red}+0.6\%}$$)
d_textureDepthCubeArray.ts 15.21 kB ($${\color{red}+0.6\%}$$)
d_textureDepthMultisampled2d.ts 15.21 kB ($${\color{red}+0.6\%}$$)
d_texture2dArray.ts 15.21 kB ($${\color{red}+0.6\%}$$)
d_textureCubeArray.ts 15.22 kB ($${\color{red}+0.6\%}$$)
d_textureMultisampled2d.ts 15.22 kB ($${\color{red}+0.6\%}$$)
d_disarrayOf.ts 16.69 kB ($${\color{red}+0.6\%}$$)
std_extensionEnabled.ts 16.25 kB ($${\color{red}+0.6\%}$$)
std_isBeingTranspiled.ts 16.55 kB ($${\color{red}+0.6\%}$$)
std_getShaderStage.ts 16.61 kB ($${\color{red}+0.5\%}$$)
std_getTargetShaderLanguage.ts 16.62 kB ($${\color{red}+0.5\%}$$)
std_range.ts 16.51 kB ($${\color{red}+0.5\%}$$)
tgpu_comptime.ts 16.02 kB ($${\color{red}+0.5\%}$$)
d_vec2.ts 48.50 kB
d_vec3.ts 48.50 kB
d_vec4.ts 48.50 kB

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 Sep 16, 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 [1.08, 2.10, 5.02, 7.37, 8.13, 12.27, 26.60, 27.52]
  line [1.01, 2.18, 4.65, 6.36, 7.88, 11.71, 26.27, 26.64]
  line [0.96, 2.00, 4.23, 6.70, 8.43, 13.50, 24.73, 24.67]
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.32, 0.56, 0.78, 0.93, 1.23, 1.25, 1.50, 1.66]
  line [0.29, 0.51, 0.71, 0.85, 1.18, 1.26, 1.51, 1.63]
  line [0.27, 0.47, 0.73, 0.92, 1.14, 1.21, 1.43, 1.55]
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.87, 2.55, 4.49, 7.89, 14.04, 28.38, 60.71, 126.26]
  line [0.90, 2.31, 4.05, 7.24, 12.48, 27.22, 57.29, 116.49]
  line [0.89, 2.22, 3.79, 7.30, 12.78, 26.74, 57.61, 114.26]
Loading

@github-actions

Copy link
Copy Markdown

Abstract vector CPU benchmark

v24.20.0, AMD EPYC 7763 64-Core Processor. Median ns/op; lower is better. Ratios compare TypeGPU with the fastest measured plain-JS contender.

Workload Object Class Array TypeGPU JS / TypeGPU Target TypeGPU Target / PR
vec2/construct 8.2 9.0 8.1 12.1 0.67× N/A N/A
vec2/copy 18.8 19.1 18.1 18.3 0.99× N/A N/A
vec2/add 19.2 19.5 19.1 25.7 0.74× N/A N/A
vec2/scale 18.5 19.0 18.3 23.3 0.79× N/A N/A
vec2/chain 19.2 19.6 19.7 35.0 0.55× N/A N/A
vec2/normalize 19.3 20.1 20.0 27.4 0.70× N/A N/A
vec2/dot 16.8 16.8 16.8 23.1 0.73× N/A N/A
vec2/length 18.2 18.0 18.0 21.0 0.86× N/A N/A
vec2/sin 43.5 43.3 43.4 53.0 0.82× N/A N/A
vec2/swizzle 18.6 18.8 18.0 17.3 1.04× N/A N/A
vec3/construct 23.1 19.5 22.0 20.2 0.96× N/A N/A
vec3/copy 23.9 20.7 19.8 18.9 1.05× N/A N/A
vec3/add 26.4 22.3 21.5 29.1 0.74× N/A N/A
vec3/scale 25.2 20.5 21.0 27.0 0.76× N/A N/A
vec3/chain 25.2 22.3 25.2 40.6 0.55× N/A N/A
vec3/normalize 25.7 24.0 21.7 32.4 0.67× N/A N/A
vec3/dot 18.0 19.1 17.5 25.5 0.69× N/A N/A
vec3/length 19.1 19.9 18.6 22.8 0.82× N/A N/A
vec3/sin 56.6 56.0 52.6 65.3 0.81× N/A N/A
vec3/swizzle 25.0 20.5 20.6 17.7 1.16× N/A N/A
vec3/cross 27.2 22.4 22.2 31.0 0.72× N/A N/A
vec4/construct 26.8 20.7 21.3 22.3 0.93× N/A N/A
vec4/copy 27.2 24.0 22.1 19.2 1.15× N/A N/A
vec4/add 30.9 25.9 23.7 32.7 0.73× N/A N/A
vec4/scale 27.4 23.8 21.5 29.1 0.74× N/A N/A
vec4/chain 31.1 26.7 27.2 45.7 0.58× N/A N/A
vec4/normalize 30.2 27.5 22.9 59.2 0.39× N/A N/A
vec4/dot 18.1 19.4 17.1 27.6 0.62× N/A N/A
vec4/length 19.6 21.2 19.3 24.6 0.78× N/A N/A
vec4/sin 71.5 72.9 65.6 84.5 0.78× N/A N/A
vec4/swizzle 27.3 23.4 21.8 18.4 1.18× N/A N/A

Fresh processes, varying inputs, fresh result objects, escaped allocations, and component-wise correctness checks. JS / TypeGPU near 1× means parity. Noise at nanosecond scales and shared CI runners can be substantial; results are advisory, not a timing gate. N/A means the target does not expose abstract vectors.

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