About @branchHint performance

Recently, std: Add branchHint to `std.math.pow` by LiamSwayne · Pull Request #22265 · ziglang/zig · GitHub was committed.

I’m curious about what happens if a 10-30% of the values are NaN.
This may happens in some specific cases, like when handling data from a low power wireless device.

Will @branchHint degrade the performance in this case?
Is Profile-guided optimization a better choice?

Thanks
Manlio

Yes, if you give the compiler some information and it turns out to be wrong, you could have worse performance. Profile-guided optimization is better, but it takes a lot more work.

You always have the option to copy the function remove the @branchHint and compare the performance.