Test name | Executions per second |
---|---|
For loop | 5868972.5 Ops/sec |
While loop | 3830491.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);
}