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?

  1. iterating on primitive array faster.
  2. comparable "json size" b) not lose "column" information

this npm of interest: https://github.com/michaelwittig/fliptable


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -