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

Issue 17291016: MIPS: Generators: Avoid calling into runtime if operand stack is empty (Closed)

Created:
7 years, 6 months ago by palfia
Modified:
7 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

MIPS: Generators: Avoid calling into runtime if operand stack is empty Port r15240 (909f716e) Original commit message: This patch makes yield sites save the resume continuation and context inline. If the operand stack is empty, we can avoid a call into the runtime. This also makes the SuspendJSGeneratorObject runtime function less magical: it just has to save the operand stack and stack handlers. This speeds up the following case by a factor of 3 or so: function* until(n) { for (var i = 0; i < n; i++) yield i; } function sum(iter) { var sum = 0; for (var x of iter) sum += x; return sum; } for (var i = 0; i < 10000; i++) sum(until(1000)) Also, there is no more sentinel value as the generators will resume in the right place already, allowing me to remove the hack added to the --debug-code check in r14437. BUG= Committed: https://code.google.com/p/v8/source/detail?r=15258

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -15 lines) Patch
M src/mips/full-codegen-mips.cc View 3 chunks +39 lines, -15 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
palfia
7 years, 6 months ago (2013-06-20 23:35:00 UTC) #1
Paul Lind
lgtm
7 years, 6 months ago (2013-06-20 23:41:55 UTC) #2
palfia
7 years, 6 months ago (2013-06-20 23:43:18 UTC) #3
Message was sent while issue was closed.
Committed manually as r15258 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698