You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The record/replay bytecodes (RecordReplayIncExecutionProgressCounter and RecordReplayInstrumentation[Generator]) are always compiled into calls into the runtime. On the simple benchmark below this leads to a 20x overhead when recording (30ms) vs. not recording (700ms). On gecko, where we optimize these bytecodes, the overhead is much less (65ms vs 75ms). We need to optimize how these bytecodes are compiled to avoid degrading JS performance excessively.
function foo() {
const arr = [];
for (let i = 0; i < 2000000; i++) {
arr.push(i);
arr.push(i + 1);
arr.push(i + 2);
arr.push(i + 3);
arr.pop();
arr.pop();
arr.pop();
}
}
The text was updated successfully, but these errors were encountered:
This is in a pretty good place for now. We still aren't optimizing calls to the runtime methods --- I haven't found anything in V8 comparable that we can crib from and I'm trying to avoid changing too much inside V8 until things are pretty stable (especially after dealing with #6). The implementations for these methods are much simpler now however, and we aren't emitting instrumentation opcodes when recording. These bring the time taken by chromium on the above benchmark to 50ms, less than 2x overhead vs. not recording.
The record/replay bytecodes (RecordReplayIncExecutionProgressCounter and RecordReplayInstrumentation[Generator]) are always compiled into calls into the runtime. On the simple benchmark below this leads to a 20x overhead when recording (30ms) vs. not recording (700ms). On gecko, where we optimize these bytecodes, the overhead is much less (65ms vs 75ms). We need to optimize how these bytecodes are compiled to avoid degrading JS performance excessively.
The text was updated successfully, but these errors were encountered: