#Please Post Your Burst Compiler Optimization Tips!

1 messages · Page 1 of 1 (latest)

vivid escarp
#

It's pretty well known that the burst compiler can have massive performance benefits when used properly, Unity even has optimization guidelines for specific use cases (https://docs.unity3d.com/Packages/com.unity.burst@1.8/manual/optimization-overview.html). However there isn't a lot of good information out there on how exactly the code should be structured inside of the execute functions. So I wanted to give people the opportunity to not only read other's optimization tips, but also to share some of their own. So please post all you've learned about the burst compiler so far when it comes to squeezing out as much speed as possible, do's and dont's, optimized structures, anything somebody could think about as they're writing their Burst Compiler code!

#

The biggest thing I've learned so far is to make sure you're creating new Native Containers as infrequently as possible. I was able to drastically increase the speed of one of my jobs simply by re-using a pre-created native array versus creating a new one for each step in the loop.

merry wedge
pulsar nebula