Skip to content

Commit e8305d2

Browse files
authored
docs: update old [tag] -> @[tag] (#22036)
1 parent c69dfef commit e8305d2

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

doc/docs.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -6686,10 +6686,10 @@ performance, memory usage, or size.
66866686
66876687
| Tuning Operation | Benefits | Drawbacks |
66886688
|--------------------------|---------------------------------|---------------------------------------------------|
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 |
66936693
| `_likely_/_unlikely_` | Performance | Risk of negative performance impact |
66946694
| `-skip-unused` | Performance, Compile time, Size | Potential instability |
66956695
| `-fast-math` | Performance | Risk of incorrect mathematical operations results |
@@ -6699,9 +6699,9 @@ performance, memory usage, or size.
66996699
67006700
### Tuning operations details
67016701
6702-
#### `[inline]`
6702+
#### `@[inline]`
67036703
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
67056705
cases, may be beneficial for performance, but may impact the size of your executable.
67066706
67076707
**When to Use**
@@ -6713,9 +6713,9 @@ cases, may be beneficial for performance, but may impact the size of your execut
67136713
- Large functions, as it might cause code bloat and actually decrease performance.
67146714
- Large functions in `if` expressions - may have negative impact on instructions cache.
67156715
6716-
#### `[direct_array_access]`
6716+
#### `@[direct_array_access]`
67176717
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
67196719
directly into C array operations - omitting bounds checking. This may save a lot of time in a
67206720
function that iterates over an array but at the cost of making the function unsafe - unless the
67216721
boundaries will be checked by the user.
@@ -6729,10 +6729,10 @@ sure that the access index will be valid.
67296729
67306730
- Everywhere else.
67316731
6732-
#### `[packed]`
6732+
#### `@[packed]`
67336733
67346734
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
67366736
may negatively impact performance or even be prohibited on certain CPU architectures.
67376737
67386738
**When to Use**
@@ -6744,7 +6744,7 @@ may negatively impact performance or even be prohibited on certain CPU architect
67446744
- On CPU architectures that do not support unaligned memory access or when high-speed memory access
67456745
is needed.
67466746
6747-
#### `[aligned]`
6747+
#### `@[aligned]`
67486748
67496749
The `@[aligned]` attribute can be applied to a structure or union to specify a minimum alignment
67506750
(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
67836783
67846784
See also ["What Every Programmer Should Know About Memory", by Ulrich Drepper](https://people.freebsd.org/~lstewart/articles/cpumemory.pdf) .
67856785
6786-
#### `[minify]`
6786+
#### `@[minify]`
67876787
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
67906790
cause issues with binary serialization or reflection. Be mindful of these potential side effects
67916791
when using this attribute.
67926792
@@ -7895,4 +7895,4 @@ Assignment Operators
78957895
&= |= ^=
78967896
>>= <<= >>>=
78977897
&&= ||=
7898-
```
7898+
```

0 commit comments

Comments
 (0)