Closed
Bug 797551
Opened 13 years ago
Closed 13 years ago
IonMonkey: Use callWithABI() for Math.random()
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: sstangl, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [ion:t])
Attachments
(1 file)
8.65 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
It's fairly common to see Math.random() in benchmarks intended to measure repeated performance of some other aspect of the engine. For example, Bug 797401, reported today.
V8 inlines Math.random(), and we have Bug 774364 and Bug 773859 to do the same in our engine, but we can very easily just emit a call using callWithABI() and shave some time off right now. So this patch does that.
If you take the benchmark in Bug 797401 and extend the loop to run for about 5 seconds, this patch has it run in 4 seconds.
Attachment #667651 -
Flags: review?(dvander)
Comment on attachment 667651 [details] [diff] [review]
patch
Review of attachment 667651 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ion/CodeGenerator.cpp
@@ +1785,5 @@
> + Register temp = ToRegister(ins->temp());
> +
> + masm.setupUnalignedABICall(1, temp);
> + masm.loadJSContext(temp);
> + masm.passABIArg(temp);
if (temp == r0) will this break on ARM? I thought that the temporary couldn't conflict with one of the registers used for passABIArg. If so we'll need two temporaries.
Attachment #667651 -
Flags: review?(dvander) → review+
Reporter | ||
Comment 2•13 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/64bf5f240ccb
It doesn't look like it would break on ARM, but temporaries are free at callsites anyway.
![]() |
||
Updated•13 years ago
|
Whiteboard: [ion:t]
Comment 3•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in
before you can comment on or make changes to this bug.
Description
•