Test name | Executions per second |
---|---|
For loop | 2674024.5 Ops/sec |
While loop | 1869762.0 Ops/sec |
var acts = "BRA|BRA|FLR|VSL|BRA".split("|");
for (var i = 0; i < acts.length -1; i++) {
if (acts[i] == "BRA") acts.splice(i, 1);
}
var acts = "BRA|BRA|FLR|VSL|BRA".split("|");
var i = acts.length;
while (i--) {
if (acts[i] == "BRA") acts.splice(i, 1);
}