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

Issue 61123003: Inline integer modulo operation. (Closed)

Created:
7 years, 1 month ago by srdjan
Modified:
7 years, 1 month ago
Reviewers:
zra, sra1
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Inline integer modulo operation. R=zra@google.com Committed: https://code.google.com/p/dart/source/detail?r=30075

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 10

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -49 lines) Patch
M runtime/vm/flow_graph_builder.cc View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 3 4 5 4 chunks +36 lines, -28 lines 0 comments Download
M runtime/vm/intermediate_language_arm.cc View 1 2 3 4 5 3 chunks +40 lines, -5 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 2 3 4 5 3 chunks +46 lines, -5 lines 0 comments Download
M runtime/vm/intermediate_language_mips.cc View 1 2 3 4 5 3 chunks +34 lines, -5 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 2 3 4 5 4 chunks +73 lines, -5 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
srdjan
Noticed speedups in Smi.toString.
7 years, 1 month ago (2013-11-06 23:36:54 UTC) #1
sra1
DBC https://codereview.chromium.org/61123003/diff/230001/runtime/vm/intermediate_language_ia32.cc File runtime/vm/intermediate_language_ia32.cc (right): https://codereview.chromium.org/61123003/diff/230001/runtime/vm/intermediate_language_ia32.cc#newcode2468 runtime/vm/intermediate_language_ia32.cc:2468: __ j(ZERO, deopt); This should be unnecessary in ...
7 years, 1 month ago (2013-11-07 00:50:22 UTC) #2
srdjan
https://codereview.chromium.org/61123003/diff/230001/runtime/vm/intermediate_language_ia32.cc File runtime/vm/intermediate_language_ia32.cc (right): https://codereview.chromium.org/61123003/diff/230001/runtime/vm/intermediate_language_ia32.cc#newcode2468 runtime/vm/intermediate_language_ia32.cc:2468: __ j(ZERO, deopt); On 2013/11/07 00:50:23, sra1 wrote: > ...
7 years, 1 month ago (2013-11-07 05:26:51 UTC) #3
zra
lgtm https://codereview.chromium.org/61123003/diff/230001/runtime/vm/intermediate_language_arm.cc File runtime/vm/intermediate_language_arm.cc (right): https://codereview.chromium.org/61123003/diff/230001/runtime/vm/intermediate_language_arm.cc#newcode2489 runtime/vm/intermediate_language_arm.cc:2489: __ Asr(IP, right, kSmiTagSize); // SmiUntag right into ...
7 years, 1 month ago (2013-11-07 16:40:06 UTC) #4
srdjan
https://codereview.chromium.org/61123003/diff/230001/runtime/vm/intermediate_language_arm.cc File runtime/vm/intermediate_language_arm.cc (right): https://codereview.chromium.org/61123003/diff/230001/runtime/vm/intermediate_language_arm.cc#newcode2489 runtime/vm/intermediate_language_arm.cc:2489: __ Asr(IP, right, kSmiTagSize); // SmiUntag right into IP. ...
7 years, 1 month ago (2013-11-07 21:26:10 UTC) #5
srdjan
Committed patchset #6 manually as r30075 (presubmit successful).
7 years, 1 month ago (2013-11-07 21:50:33 UTC) #6
sra1
https://codereview.chromium.org/61123003/diff/230001/runtime/vm/intermediate_language_ia32.cc File runtime/vm/intermediate_language_ia32.cc (right): https://codereview.chromium.org/61123003/diff/230001/runtime/vm/intermediate_language_ia32.cc#newcode2468 runtime/vm/intermediate_language_ia32.cc:2468: __ j(ZERO, deopt); On 2013/11/07 05:26:52, srdjan wrote: > ...
7 years, 1 month ago (2013-11-08 01:40:15 UTC) #7
srdjan
7 years, 1 month ago (2013-11-08 16:02:53 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/61123003/diff/230001/runtime/vm/intermediate_...
File runtime/vm/intermediate_language_ia32.cc (right):

https://codereview.chromium.org/61123003/diff/230001/runtime/vm/intermediate_...
runtime/vm/intermediate_language_ia32.cc:2468: __ j(ZERO, deopt);
On 2013/11/08 01:40:16, sra1 wrote:
> On 2013/11/07 05:26:52, srdjan wrote:
> > On 2013/11/07 00:50:23, sra1 wrote:
> > > This should be unnecessary in cases where right == 10.
> > > Does range information tell you this?
> > 
> > Yes. I had the code in and have removed it in order to make the Cl simpler.
> The
> > cost of a division is so high that I could not measure any benefit by
skipping
> > the tests here and below. I may try more measurements later. Having less
> > variations makes me more certain that the code is being tested.
> 
> I see.  The latency of idiv covers everything else in the loop.
> Probably the only way left to win is to merge "val ~/ 10" and "val % 10" into
a
> single idiv.

Yes, preliminary measurement show a big benefit of merging div/mod. That is what
I am (finally) working on next.

Powered by Google App Engine
This is Rietveld 408576698