Burst no alias hint

The Burst documentation is a bit outdated. In my case specifically:

Aliasing Checks
Since aliasing is so key to the compilers ability to optimize for performance, we’ve added some experimental aliasing intrinsics:

  • Unity.Burst.Aliasing.ExpectAlias expects that the two pointers do alias, and generates a compiler error if not.
  • Unity.Burst.Aliasing.ExpectNoAlias expects that the two pointers do not alias, and generates a compiler error if not.

Unity.Burst.Aliasing doesn’t exist anymore. I need to instruct Burst to disable Alias checks, as I am sure there is no aliasing. How?

I guess it’s the NoAlias attribute that must be set on the parameters. I’ll do some tests.

Yeah you want the NoAlias attribute on the parameters.

The experimental Aliasing intrinsics are for ensuring that the compiler definitely knows that something does or does not alias - they will generate compiler errors if it doesn’t (its a way for us to try and give you, the user, more insight into what the compiler thinks).

I hope to have them non-experimental in the Burst 1.3.0 timeframe (so a little while away yet).