Most efficient way to send an array of arrays from JS to external?
So lets say I have an object that looks like this in javascript:
var data = [[0,0,0xffffffff],[1,1,0xffffffff],[2,2,0xffff0000], [3,3,0xff00ff00];
This is basically an array of x,y coords and colors.
What is the most efficient way to send this data from javascript to an external that I am developing?
So in pseudo code, something like:
myexternal.processData(data);
Some things to note:
In this example, there are only 4 objects in the array. However, in my situation this array is going to be anywhere from 1 to 5000 objects, and needs to be sent to the max external periodically, say 30x per second or every 33ms.
It seems like my choices are to either use dictionaries or to use matrices. Any other options? Any clue on which one is more efficient in the javascript->native bridge?