Let's run some benchmarks!
In this chapter I am executing scripts in C# and U#, and compare execution times
U# vs C#
U# is noticeably slower than regular C#, to benchmark it I decided to execute two scripts in U# a...
For loop
For this test I was curious to see how well Udon executes for-loops, and the results I got were r...
Recursive vs iterative
For this test I was curious to see how well Udon executes recursive methods, in the previous test...
Builtin functions vs calculating something manually
Let's say you want to calculate the distance between two vectors. Some of you would probably wri...
Function overhead test
For this test I was curious to see the overhead of a function call I executed two methods Benchm...
GetComponent<>()
Many of you may already know that calling GetComponent is pretty expensive in Unity. But how exp...
Calling methods from a separate script
Let's say you have script A that accesses a method from script B. Would it be more performant to...
Caching Networking.LocalPlayer
Some programmers like to cache the local player for later use, for instance by adding a private m...
The "ref" keyword
U# now supports the "ref" keyword, which is really cool! For those who don't know what the "ref" ...
400 Update() calls vs one Update() call iterating 400 times
What would be more performant in Udon? 400 GameObjects executing some code every frame with an...