KVM: x86: small optimization for is_mtrr_mask calculation
Quoted 13 lines · Wanpeng Li
Quoted 12 lines · linmiaohe
Quoted 10 lines · [email protected] wrote:
Quoted 9 lines · linmiaohe
Hi,
Paolo Bonzini <[email protected]> wrote:
Many thanks for suggestion. What do you mean is like this ?index = (msr - 0x200) >> 1; is_mtrr_mask = msr & 1;Thanks again.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
You realize that the compiler will probably produce exactly the same code, right? As such, it is about making the code easy for the human reader.
Even if it didn't, this code is as far from performance critical as one can possibly get.
Yep, it looks gain little. Thanks.
Please post the performance number when you mention optimize XXX later.
Sure, I would take care of this. Thanks for your reminder!