Checking mode aims to help diagnose and confirm undefined behavior. In most cases, source code don't cast pointers between unrelated types for virtual calls, so we expect direct calls in the frequent branch and debug trap in the unlikely branch. This way, the overhead of checking mode is not higher than an indirect call promotion for a hot callsite as long as the callsite doesn't run the debug trap branch.
101 KiB
101 KiB