A couple weeks ago we took a look at the performance of function pointers in Burst. In doing so, we left out an alternative: good old
switch statements. Today we’ll put those to the test to see how they stack up next to Burst’s newfangled function pointers!
Unity 2019.3 and Burst 1.2 bring us support for function pointers! Behind the scenes, these power everyday C# functionality like
abstract functions, delegates, and interfaces. Today we’ll look at how to use them and what Burst compiles them to.
Temp memory is backed by a fixed size block that’s cleared by Unity every frame. Allocations on subsequent frames return pointers to this same block. The allocated memory therefore isn’t unique. How much of a problem is this? Today we’ll do some experiments to find out!
What do you do when a job you’re writing needs to allocate memory? You could allocate it outside of the job and pass it in, but that presents several problems. You can also allocate memory from within a job. Today we’ll look into how that works and some limitations that come along with it.