qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] translate: optimize gen_intermediate_code_inter


From: li guang
Subject: Re: [Qemu-devel] [PATCH] translate: optimize gen_intermediate_code_internal
Date: Wed, 10 Apr 2013 08:28:37 +0800

在 2013-04-09二的 10:08 +0100,Peter Maydell写道:
> On 9 April 2013 09:21, li guang <address@hidden> wrote:
> > 在 2013-04-09二的 10:11 +0200,Paolo Bonzini写道:
> >> Il 09/04/2013 10:05, 陳韋任 (Wei-Ren Chen) ha scritto:
> >> > Hi liguang,
> >> >
> >> >   Just to be curious, how much performance improvement this patch can 
> >> > get?
> >>
> >> I think zero.  It is indeed making the code a tiny bit more readable in
> >> the 2nd/3rd/5th/6th hunks.
> >
> > I think maybe a little greater than 0,
> > for it optimizes a variable 'lj' increment.
> 
> (1) The compiler is easily smart enough to know that both ways
> of writing the code are equivalent, and to generate whatever
> code is better
> (2) This is in a comparatively rare code path anyway, because
> it only happens when we take an unexpected exception [eg fault
> on a guest load/store]
> (3) All optimisation should start with profiling, otherwise
> you have no idea whether you're even looking at the right
> places to improve.
> 

OK, thanks!
but, please make no mistake,
I'm not saying this patch promote performance of TCG,
this just optimize code writing of this function, of
course code writing is not deemed to promote its performance.
or, we shouldn't do any code change if they benefit little
in performance?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]