Closed
Bug 910796
Opened 12 years ago
Closed 12 years ago
Various micro-optimizations
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: sunfish, Assigned: sunfish)
Details
Attachments
(10 files)
|
3.55 KB,
patch
|
sstangl
:
review+
|
Details | Diff | Splinter Review |
|
2.29 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
|
1.67 KB,
patch
|
sstangl
:
review+
|
Details | Diff | Splinter Review |
|
2.21 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
|
751 bytes,
patch
|
sstangl
:
review+
|
Details | Diff | Splinter Review |
|
6.16 KB,
patch
|
mjrosenb
:
review+
|
Details | Diff | Splinter Review |
|
3.14 KB,
patch
|
sstangl
:
review+
nbp
:
feedback+
|
Details | Diff | Splinter Review |
|
1.03 KB,
patch
|
djvj
:
review+
|
Details | Diff | Splinter Review |
|
781 bytes,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
|
1.14 KB,
patch
|
evilpies
:
review+
|
Details | Diff | Splinter Review |
The following is a serious of miscellaneous micro-optimizations.
| Assignee | ||
Comment 1•12 years ago
|
||
Attachment #797352 -
Flags: review?(sstangl)
| Assignee | ||
Comment 2•12 years ago
|
||
Attachment #797354 -
Flags: review?(jdemooij)
| Assignee | ||
Comment 3•12 years ago
|
||
Attachment #797355 -
Flags: review?(sstangl)
| Assignee | ||
Comment 4•12 years ago
|
||
Attachment #797356 -
Flags: review?(bhackett1024)
| Assignee | ||
Comment 5•12 years ago
|
||
Attachment #797358 -
Flags: review?(sstangl)
Comment 6•12 years ago
|
||
Comment on attachment 797352 [details] [diff] [review]
micro-pow-half.patch
Review of attachment 797352 [details] [diff] [review]:
-----------------------------------------------------------------
Nice.
Attachment #797352 -
Flags: review?(sstangl) → review+
| Assignee | ||
Comment 7•12 years ago
|
||
Attachment #797360 -
Flags: review?(mrosenberg)
| Assignee | ||
Comment 8•12 years ago
|
||
Attachment #797362 -
Flags: review?(sstangl)
Updated•12 years ago
|
Attachment #797356 -
Flags: review?(bhackett1024) → review+
| Assignee | ||
Comment 9•12 years ago
|
||
Attachment #797365 -
Flags: review?(kvijayan)
| Assignee | ||
Comment 10•12 years ago
|
||
Attachment #797366 -
Flags: review?(jdemooij)
| Assignee | ||
Comment 11•12 years ago
|
||
Attachment #797367 -
Flags: review?(evilpies)
Updated•12 years ago
|
Attachment #797367 -
Flags: review?(evilpies) → review+
Comment 12•12 years ago
|
||
Comment on attachment 797362 [details] [diff] [review]
micro-args-rectifier.patch
Review of attachment 797362 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jit/x64/Trampoline-x64.cpp
@@ +361,2 @@
>
> + masm.addl(Imm32(1), r8);
nit: move this line out-side the current scope as it is not repeated in the loop.
::: js/src/jit/x86/Trampoline-x86.cpp
@@ +357,2 @@
>
> + masm.addl(Imm32(1), esi);
nit: same here.
Attachment #797362 -
Flags: feedback+
Comment 13•12 years ago
|
||
The two other patches up for review from me replace instructions with loads from memory. Are the replacements actually better?
Updated•12 years ago
|
Attachment #797365 -
Flags: review?(kvijayan) → review+
Comment 14•12 years ago
|
||
Comment on attachment 797362 [details] [diff] [review]
micro-args-rectifier.patch
Review of attachment 797362 [details] [diff] [review]:
-----------------------------------------------------------------
r+ with nicolas' suggestions.
Attachment #797362 -
Flags: review?(sstangl) → review+
| Assignee | ||
Comment 15•12 years ago
|
||
(In reply to Sean Stangl [:sstangl] from comment #13)
> The two other patches up for review from me replace instructions with loads
> from memory. Are the replacements actually better?
Assuming that the loads don't stall for some reason, both PowHalfD and AbsD are faster this way, at least on micro-benchmarks on my Sandy Bridge. According to Agner, the movsd load has latency 3 (assuming L1 cache hit etc.), which is the same as subsd (as seen in AbsD) and cvtss2sd (as seen in PowHalfD).
Comment 16•12 years ago
|
||
Comment on attachment 797354 [details] [diff] [review]
micro-sqrt.patch
Review of attachment 797354 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good.
We could do the same for AbsD on ARM to give regalloc a bit more freedom. But we'd have to move the code from Lowering to Lowering-arm/Lowering-x86-shared.
Attachment #797354 -
Flags: review?(jdemooij) → review+
Updated•12 years ago
|
Attachment #797366 -
Flags: review?(jdemooij) → review+
Updated•12 years ago
|
Attachment #797355 -
Flags: review?(sstangl) → review+
Updated•12 years ago
|
Attachment #797358 -
Flags: review?(sstangl) → review+
| Assignee | ||
Comment 17•12 years ago
|
||
(In reply to Nicolas B. Pierron [:nbp] from comment #12)
> Comment on attachment 797362 [details] [diff] [review]
> micro-args-rectifier.patch
>
> Review of attachment 797362 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: js/src/jit/x64/Trampoline-x64.cpp
> @@ +361,2 @@
> >
> > + masm.addl(Imm32(1), r8);
>
> nit: move this line out-side the current scope as it is not repeated in the
> loop.
Ok.
> ::: js/src/jit/x86/Trampoline-x86.cpp
> @@ +357,2 @@
> >
> > + masm.addl(Imm32(1), esi);
>
> nit: same here.
Ok.
https://hg.mozilla.org/integration/mozilla-inbound/rev/aceffa2fd260
https://hg.mozilla.org/integration/mozilla-inbound/rev/414d6a9f1892
https://hg.mozilla.org/integration/mozilla-inbound/rev/6ac57b836d4a
https://hg.mozilla.org/integration/mozilla-inbound/rev/e2d436b68c7c
https://hg.mozilla.org/integration/mozilla-inbound/rev/3dd740f4f19c
https://hg.mozilla.org/integration/mozilla-inbound/rev/3812728657bd
https://hg.mozilla.org/integration/mozilla-inbound/rev/77e51c35f391
https://hg.mozilla.org/integration/mozilla-inbound/rev/ea06b1ab196f
I didn't check in micro-inc64.patch. The performance impact of that change is less clear than I initially thought.
Whiteboard: [leave open]
Comment 18•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/aceffa2fd260
https://hg.mozilla.org/mozilla-central/rev/414d6a9f1892
https://hg.mozilla.org/mozilla-central/rev/6ac57b836d4a
https://hg.mozilla.org/mozilla-central/rev/e2d436b68c7c
https://hg.mozilla.org/mozilla-central/rev/3dd740f4f19c
https://hg.mozilla.org/mozilla-central/rev/3812728657bd
https://hg.mozilla.org/mozilla-central/rev/77e51c35f391
https://hg.mozilla.org/mozilla-central/rev/ea06b1ab196f
Updated•12 years ago
|
Attachment #797360 -
Flags: review?(mrosenberg) → review+
| Assignee | ||
Comment 19•12 years ago
|
||
Here's the clampIntToUint8 patch:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3d9f3a2e90f4
I'm dropping micro-inc64.patch.
Whiteboard: [leave open]
Comment 20•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•