TGViewer
Everyday Unity Everyday Unity @everydayunity · 1.18K subscribers
Post #2588 1K
Optimizing Burst matrix multiplications

A deep dive into optimizing matrix multiplications. A story of multiple optimization attempts, moving from basic implementation to hand-tuned intrinsics.
Key takeaways from the optimization journey:
* Switching to Unity’s Mathematics package (SIMD-friendly) immediately gave a massive boost over standard C#.
* The Low-Hanging Fruit: Using FloatMode.Fast allows the compiler to merge instructions into Fused Multiply-Add (FMLA).
* Reinterpreting NativeArray<Matrix4x4> as float4x4 helps the compiler see the data layout more clearly, reducing instruction count.
* Utilizing Affine Matrices (since most game objects don't use perspective projection) allows you to skip calculating the 0,0,0,1 row, saving significant cycles.
* Using Intrinsics and float4x3 to pack data tightly into vector registers.
This is a must-read if you are working on high-performance physics, skinning, or animation systems in Unity.

https://medium.com/toca-boca-tech-blog/optimizing-burst-matrix-multiplications-bfb301de80ce

#burst #optimiziation
Medium Optimizing Burst matrix multiplications Learn how to achieve 4.5x performance gains with matrix multiplications in Unity’s Burst, and how your C# code affects the final assembly.
  • 🔥 8
  • 👍 1
More from @everydayunity
  1. Sep 22, 2026Introducing GPT‑6 Sol and Luna And better & cheaper sol and luna as an immediate response…
  2. Sep 22, 2026Introducing Claude Opus 5.5 \ Anthropic Cost and speed. Opus 5.5 requires less compute to…
  3. Sep 21, 2026Claude Code effort level and model selection effort means more than just "thinking time."…
  4. Sep 19, 2026Netcode for GameObjects 3.0.0 is now available It is preparation for Unity’s shared Netcod…
  5. Sep 9, 2026Unity Plugin Official Unity plugin for Claude. https://claude.com/plugins/unity #ai
  6. Sep 5, 2026Have you tested Astra already? I checked deepswe bench and decided to test it with medium…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →