testRoundtripScopeRefAndPropIter causes 15% performance degradation
- Dominant language
- JavaScript
- Stars
- 198
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
For some reason the `testRoundtripScopeRefAndPropIter` causes a 15% performance degradation in *subsequent* benchmarks (as measured by `benchFibbonacci10k`).
Here is the offending test, from `serialize_test.js`:
```js
exports.testRoundtripScopeRefAndPropIter = function(t) {
runTest(t, 'testRoundtripScopeRefAndPropIter', `
var r = 0, o = {a: 1, b: 2};
`,`
for (var k in o) {
r += o[k];
}
`, 'r;', 3, 1, true);
};
```
N.B.: Changing seventh parameter to `runTest`—the number of steps between roundtrips—from `1` to `30` will avoid the performance hit, but setting it to `20` does not—even though in both cases just one roundtrip is done during the test (instead of 33 as would be the case roundtripping every step)!
Contributor guide
Assessment
This issue has not been assessed yet.