thanks for the pre-calculated array size tip.
but, is really values[j++] = x; faster than values.push(x); ?