8
stisch
7y

0 bytes of heap allocated per cycle! Figuring out the Unity profiler actually helped me improve my C# optimization. <3

Comments
  • 0
    Very good, sir! Details?
  • 0
    @CWins essentially I had a surprising boxing cost caused by an inheritance 'optimization' inferred by mono. by casting to the explicit type in the Awake() method (part of the MonoBehaviour life cycle) and having *that* called in Update() it dropped the cost from O(log n) to 100% free!
  • 0
    Pretty nice.

    Is there a way to make a faq-entry (post&answer) on stackoverflow, so the knowledge is conserved and spread?
Add Comment