Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(708)

Issue 10916311: Improve the assembly code for power function with integer exponential. (Closed)

Created:
8 years, 3 months ago by xqian
Modified:
8 years, 3 months ago
CC:
v8-dev
Visibility:
Public.

Description

Improve the assembly code for power function with integer exponential. The change removes one unused multiply and reschedules the shift, multiply and jump instructions to reduce stall. Experiment shows it improve about 20% performance on x86 for exponetials from about 100 to 2000. Committed: https://code.google.com/p/v8/source/detail?r=12521

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -5 lines) Patch
M src/ia32/code-stubs-ia32.cc View 1 2 1 chunk +12 lines, -5 lines 1 comment Download

Messages

Total messages: 8 (0 generated)
xqian
Hi,Yang, Kasper and Yuqiang I have a patch for intrinsic power function on ia32. Would ...
8 years, 3 months ago (2012-09-14 14:36:44 UTC) #1
Yang
Thanks for this patch! I'll land this patch once the following two comments are addressed. ...
8 years, 3 months ago (2012-09-14 15:38:16 UTC) #2
xqian
Hi, Yang Thanks for your review. I refined the code according to your comments. Please ...
8 years, 3 months ago (2012-09-17 03:10:48 UTC) #3
Yang
On 2012/09/17 03:10:48, xqian wrote: > Hi, Yang > > Thanks for your review. I ...
8 years, 3 months ago (2012-09-17 07:40:14 UTC) #4
xqian
On 2012/09/17 07:40:14, Yang wrote: > On 2012/09/17 03:10:48, xqian wrote: > > Hi, Yang ...
8 years, 3 months ago (2012-09-17 09:39:15 UTC) #5
Vyacheslav Egorov (Google)
DBC https://codereview.chromium.org/10916311/diff/5002/src/ia32/code-stubs-ia32.cc File src/ia32/code-stubs-ia32.cc (right): https://codereview.chromium.org/10916311/diff/5002/src/ia32/code-stubs-ia32.cc#newcode3216 src/ia32/code-stubs-ia32.cc:3216: Label no_neg, while_true, no_multiply, while_false; I have an ...
8 years, 3 months ago (2012-09-17 22:12:02 UTC) #6
xqian
On 2012/09/17 22:12:02, Vyacheslav Egorov (Google) wrote: > DBC > > https://codereview.chromium.org/10916311/diff/5002/src/ia32/code-stubs-ia32.cc > File src/ia32/code-stubs-ia32.cc ...
8 years, 3 months ago (2012-09-18 06:29:57 UTC) #7
xqian
8 years, 3 months ago (2012-09-18 06:36:25 UTC) #8
On 2012/09/17 07:40:14, Yang wrote:
> On 2012/09/17 03:10:48, xqian wrote:
> > Hi, Yang
> > 
> > Thanks for your review. I refined the code according to your comments.
Please
> > check the patch set 3. 
> > 
> > Thanks,
> > -Xi
> > On 2012/09/14 15:38:16, Yang wrote:
> > > Thanks for this patch! I'll land this patch once the following two
comments
> > are
> > > addressed.
> > > 
> > >
> https://codereview.chromium.org/10916311/diff/3001/src/ia32/code-stubs-ia32.cc
> > > File src/ia32/code-stubs-ia32.cc (right):
> > > 
> > >
> >
>
https://codereview.chromium.org/10916311/diff/3001/src/ia32/code-stubs-ia32.c...
> > > src/ia32/code-stubs-ia32.cc:3224: __ j(above, &while_true, Label::kNear);
> > > Please add a comment here that the above flag is set if the bit shifted
out
> > was
> > > not set. This would make understanding this easier.
> > > 
> > >
> >
>
https://codereview.chromium.org/10916311/diff/3001/src/ia32/code-stubs-ia32.c...
> > > src/ia32/code-stubs-ia32.cc:3225: __ mulsd(double_result, double_scratch);
> > > Since double_result is 1 here, wouldn't movq(double_result,
double_scratch)
> do
> > > the same? That would actually be more readable imo. Maybe also faster?
> 
> LGTM. Landing.
> 
> Does it make sense to port this to x64?

I tried the patch on x64 and it got similar performance improvement. The patch
is created at https://codereview.chromium.org/10939013/. Would you please review
it?

Thanks,
-Xi

Powered by Google App Engine
This is Rietveld 408576698