我需要存储股市数据以供操纵。哪个更有效率,
1) 将数据存储为开、高、低、关、日期的多维数组
//Data array stored in a array
var tickdata = new Array();
tickdata.push([open,high,low,close,volume,date])
2)将数据存储为object对象,如下图
function dailyData(open, high, low, close,volume,date)
{
this.open = open;
this.high = high;
this.low = low;
this.close = close;
this.volume=volume;
this.date=date;
}
var data = new Array();
data[0] = new dailyData(1017.50,1032.50 ,997.50, 1025.40,4187510,'07-Jan-2005');