Re: [PATCH] KVM: x86: small optimization for is_mtrr_mask calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hpa@xxxxxxxxx wrote:
>>On March 5, 2020 6:05:40 PM PST, linmiaohe <linmiaohe@xxxxxxxxxx> wrote:
>>Hi,
>>Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
>>Many thanks for suggestion. What do you mean is like this ?
>>
>>	index = (msr - 0x200) >> 1;
>>	is_mtrr_mask = msr & 1;
>>
>>Thanks again.
>
>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.





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux