fix(bench): do not double-reverse in list.js file (#133)

This commit is contained in:
Luke Edwards 2021-06-23 23:13:17 -07:00 committed by GitHub
parent aba0546c2a
commit 6ce5c9f57e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,9 @@
function reverse(list) {
var i=0, tmp, idx, count=list.length;
for (; i < count; i++) {
var i=0, tmp, idx;
var count = list.length;
var max = count / 2 | 0;
for (; i < max; i++) {
idx = count - i - 1;
tmp = list[idx];
list[idx] = list[i];