On 8/14/24 5:44 AM, Olivier Langlois wrote: > At this point, the only thing remaining point to determine is which > between calling a function pointer of calling a 2 conditional branches > code is more efficient. and I am of the opinion that the function > pointer is better due to my C++ background but this is debatable... As mentioned earlier, your C++ background for systems programming isn't super relevant here. Even without mitigations, a perfectly predictable branch is surely faster than an indirect function call. And with mitigations, it's not even close. It's a single handler, just do the branches. I don't think this is worth fretting over. -- Jens Axboe