@@ -6686,10 +6686,10 @@ performance, memory usage, or size.
6686
6686
6687
6687
| Tuning Operation | Benefits | Drawbacks |
6688
6688
| --------------------------| ---------------------------------| ---------------------------------------------------|
6689
- | ` [inline]` | Performance | Increased executable size |
6690
- | ` [direct_array_access]` | Performance | Safety risks |
6691
- | ` [packed]` | Memory usage | Potential performance loss |
6692
- | ` [minify]` | Performance, Memory usage | May break binary serialization/reflection |
6689
+ | ` @ [inline]` | Performance | Increased executable size |
6690
+ | ` @ [direct_array_access]` | Performance | Safety risks |
6691
+ | ` @ [packed]` | Memory usage | Potential performance loss |
6692
+ | ` @ [minify]` | Performance, Memory usage | May break binary serialization/reflection |
6693
6693
| ` _likely_/_unlikely_` | Performance | Risk of negative performance impact |
6694
6694
| ` -skip-unused` | Performance, Compile time, Size | Potential instability |
6695
6695
| ` -fast-math` | Performance | Risk of incorrect mathematical operations results |
@@ -6699,9 +6699,9 @@ performance, memory usage, or size.
6699
6699
6700
6700
# ## Tuning operations details
6701
6701
6702
- # ### `[inline]`
6702
+ # ### `@ [inline]`
6703
6703
6704
- You can tag functions with ` [inline]` , so the C compiler will try to inline them, which in some
6704
+ You can tag functions with ` @ [inline]` , so the C compiler will try to inline them, which in some
6705
6705
cases, may be beneficial for performance, but may impact the size of your executable.
6706
6706
6707
6707
** When to Use**
@@ -6713,9 +6713,9 @@ cases, may be beneficial for performance, but may impact the size of your execut
6713
6713
- Large functions, as it might cause code bloat and actually decrease performance.
6714
6714
- Large functions in ` if` expressions - may have negative impact on instructions cache.
6715
6715
6716
- # ### `[direct_array_access]`
6716
+ # ### `@ [direct_array_access]`
6717
6717
6718
- In functions tagged with ` [direct_array_access]` the compiler will translate array operations
6718
+ In functions tagged with ` @ [direct_array_access]` the compiler will translate array operations
6719
6719
directly into C array operations - omitting bounds checking. This may save a lot of time in a
6720
6720
function that iterates over an array but at the cost of making the function unsafe - unless the
6721
6721
boundaries will be checked by the user.
@@ -6729,10 +6729,10 @@ sure that the access index will be valid.
6729
6729
6730
6730
- Everywhere else.
6731
6731
6732
- # ### `[packed]`
6732
+ # ### `@ [packed]`
6733
6733
6734
6734
The ` @[packed]` attribute can be applied to a structure to create an unaligned memory layout,
6735
- which decreases the overall memory footprint of the structure. Using the ` [packed]` attribute
6735
+ which decreases the overall memory footprint of the structure. Using the ` @ [packed]` attribute
6736
6736
may negatively impact performance or even be prohibited on certain CPU architectures.
6737
6737
6738
6738
** When to Use**
@@ -6744,7 +6744,7 @@ may negatively impact performance or even be prohibited on certain CPU architect
6744
6744
- On CPU architectures that do not support unaligned memory access or when high-speed memory access
6745
6745
is needed.
6746
6746
6747
- # ### `[aligned]`
6747
+ # ### `@ [aligned]`
6748
6748
6749
6749
The ` @[aligned]` attribute can be applied to a structure or union to specify a minimum alignment
6750
6750
(in bytes) for variables of that type. Using the ` @[aligned]` attribute you can only * increase*
@@ -6783,10 +6783,10 @@ is CPU specific, and the compiler already usually will choose a good default for
6783
6783
6784
6784
See also [" What Every Programmer Should Know About Memory" , by Ulrich Drepper](https://people.freebsd.org/~lstewart/articles/cpumemory.pdf) .
6785
6785
6786
- # ### `[minify]`
6786
+ # ### `@ [minify]`
6787
6787
6788
- The ` [minify]` attribute can be added to a struct, allowing the compiler to reorder the fields in
6789
- a way that minimizes internal gaps while maintaining alignment. Using the ` [minify]` attribute may
6788
+ The ` @ [minify]` attribute can be added to a struct, allowing the compiler to reorder the fields in
6789
+ a way that minimizes internal gaps while maintaining alignment. Using the ` @ [minify]` attribute may
6790
6790
cause issues with binary serialization or reflection. Be mindful of these potential side effects
6791
6791
when using this attribute.
6792
6792
@@ -7895,4 +7895,4 @@ Assignment Operators
7895
7895
&= |= ^=
7896
7896
>>= <<= >>>=
7897
7897
&&= ||=
7898
- ```
7898
+ ```
0 commit comments