PLEASE learn to use code tags, they make reading and commenting on source code MUCH easier. http://www.cplusplus.com/articles/jEywvCM9/ http://www.cplusplus.com/articles/z13hAqkS/ HINT: you can edit your post and add code tags. Some formatting & indentation would not hurt either |
Visual Studio 2019 version 16.6 and later: (Available with /std:c++20 and later.) The [[likely]] attribute specifies a hint to the compiler that the code path for the attributed label or statement is more likely to execute than alternatives. In the Microsoft compiler, the [[likely]] attribute marks blocks as "hot code", which increments an internal optimization score. The score is incremented more when optimizing for speed, and not as much when optimizing for size. The net score affects the likelihood of inlining, loop unrolling, and vectorizing optimizations. The effect of [[likely]] and [[unlikely]] is similar to Profile-guided optimization, but limited in scope to the current translation unit. The block reordering optimization isn't implemented yet for this attribute. |