NB: These are rarely needed, and should not be used, unless you profile your code, and then see that there are significant benefits for them. To cite gcc’s documentation: “programmers are notoriously bad at predicting how their programs actually perform”.
[direct_array_access]
- in functions tagged with the compiler will translate array operations directly into C array operations - omiting bounds checking. This may save a lot of time in a function that iterates over an array but at the cost of making the function unsafe - unless the boundries will be checked by the user.
similar to _likely_(x)
, but it hints that the boolean expression is highly improbable. In the JS backend, that does nothing.