[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH] p2m-pt: avoid get the pte falgs repeatedly.
> >>> On 17.11.16 at 09:24, <liang.z.li@xxxxxxxxx> wrote: > > There are a lot of code try to get the pte flags repeatedly, why not > > save the result and reuse it in the following code? It can help to > > save some CPU cycles and make the code cleaner, no? > > > > I am not sure if this is the right direction, just change one place. > > Did you compare generated code with and without this change? A compiler No. > doing well optimization wise may produce better code in at least some of the > cases: The calculation involved in lNe_get_flags() may be possible to > completely elide, and hence your patch may increase register pressure / > stack consumption due to the new variable. But of course a benefit of the > change is better overall readability ... > Good to know that it's worthy to make the change. > In any event you'd need to address various style issues before such a patch > could be accepted. Of course, and I will try to change other places and resend the patch. Thanks! Liang > > Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |