Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BurstColliderWorld.GenerateContactsJob Alloc
#1
Hi, 
Another day another random find when looking through unity's profiler, 
pre-allocating 32 elements in a NativeList removes a lot of alloc work inside the Job, like so (note, example is pretty extreme, 10s of simulations, but it's an 80% cut on standalone build)
[Image: prealloc.png]
Side Note: Value of 32 was chosen at random.
Reply


Messages In This Thread
BurstColliderWorld.GenerateContactsJob Alloc - by ThoughtMango - 01-07-2021, 10:23 AM