|
|
|
|
|
by kykat
83 days ago
|
|
V8 automatically optimizes objects with the same shape into efficient structs, making array of objects much more efficient than in Java. And the manually manager int array acts more like system memory, it's not continuous, so you could have point i 0 and 2 and the data would be:
[1, 2, 3, x, x,x, 3, 2, 1] (3D points). So I am not describing a struct of arrays. |
|
The optimization you discussed for GIS data is called struct of arrays. JavaScript does not do that automatically for you. You would have to do the same thing manually in JavaScript to avoid per-triple object overhead.