javascript - Time-series data in JSON -
i need model 1,000,000+ data points in json. thinking of 2 ways of doing this:
a) array of objects:
[{time:123456789,value:1432423},{time:123456790,value:1432424},....]
or
b) nested arrays
[[123456789,1432423],[123456790,1432424],....]
naively comparing these 2 approaches, feels latter faster because uses less characters less descriptive. b faster ? 1 choose , why ?
is there 3rd approach ?
{time:[123456789,123456790,...], value:[1432423,1432424,...]}
why?
- iterating on primitive array faster.
- comparable "json size" b) not lose "column" information
this npm of interest: https://github.com/michaelwittig/fliptable
Comments
Post a Comment