Closed Bug 469938 Opened 16 years ago Closed 16 years ago

TM: 19x slowdown due to questionable "unstable loop variable"

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 469044

People

(Reporter: jruderman, Assigned: gal)

Details

(Keywords: perf, testcase)

// c must be undeclared
for (var iter = 0; iter < 100000; ++iter) {
  c = "2";
  c = 3;
}

19x slower with -j than without.  The variable |c| has the same type at the end of each loop, so why does this keep triggering the "unstable loop variable" unhappiness?
Flags: blocking1.9.1?
Oh, is this what bug 469044 is about?
./Darwin_DBG.OBJ/js -j x.js
recorder: started(33333), aborted(0), completed(0), different header(0), trees trashed(0), slot promoted(0), unstable loop variable(33333), breaks(0), returns(0), unstableInnerCalls(0)
monitor: triggered(0), exits(0), type mismatch(0), global mismatch(2)

33333 traces started? Blocker for sure.
+1 for blocking from me, working on it
Assignee: general → gal
This is a dup of 469044. c is an undeclared global, and it changes type from string to int so we end up flushing the cache every time we go through the code. 469044 fixes this.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Flags: blocking1.9.1? → blocking1.9.1+
You need to log in before you can comment on or make changes to this bug.