qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
branch_hints.h File Reference

Branch prediction hint utilities for performance optimization. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool qb::likely (bool expr)
 Hint for branch prediction when a condition is expected to be true.
bool qb::unlikely (bool expr)
 Hint for branch prediction when a condition is expected to be false.

Detailed Description

Branch prediction hint utilities for performance optimization.

This file provides utility functions (qb::likely, qb::unlikely) that give branch prediction hints to the compiler. These functions can potentially improve performance by helping the compiler make better decisions about code generation for conditional branches, especially in performance-critical sections.

Author
qb - C++ Actor Framework

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.