I have two list x_values and y_values such as :
x_values = [x1, x2, ...., xN];
y_values = [y1, y2, ...., yN];
I would like to create a list result such as :
result = [[x1, y1], [x2, y2], .... [xN, yN]]
Currently I am doing the following :
let result = [];
// Format new data
for (let j = 0; j < x_values.length; j++) {
result.push([x_values[j], y_values[j]]);
}
This is working, but when N is very high, this script is really slow (I need to execute it multiple times per second)
Do you have any way to accelerate the generation of this list ?
Thanks :)