Strength Reduction

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Strength Reduction
let x = 7;
let arr = [];
for (let i = 0; i < 10; i++) {
    arr[i] = x * i;
}
ready
Strength Reduction Optimization
let x = 7;
let s = 0;
let arr = [];
for (let i = 0; i < 10; i++) {
    arr[i] = s;
    s += x;
}
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.