I established a very large model using julia with plenty of variables and expressions. Though not all of these will be meaningful for accessing, I still wrote all into results in dataframe and then saved to csv files. I’d like to know how could I access a column or row of a large matrix, let’s say in two or three dimensions with index length over hundred, and fill them into a dataframe with fast speed.
For example, I have an expression named NeededExpr in JuMP with index f,z,t, the length of them is 6, 31 and 168 (or larger). And I need NeededExpr[f, z, t] with given f and z, should I use value.(NeededExpr[f, z, t]) or value.(NeededExpr)[f, z, t]?
Typically, the last index represents time and is the biggest. In practice we need to store and access it for many times. When I discussed with others about how julia store and access data, we came into a claim that julia stores and accesses data in column order, so if we place t at the first position like NeededExpr[t, f, z] and execute value.(NeededExpr)[:, f, z], will this be faster than NeededExpr[f, z, t] and value.(NeededExpr)[f, z, :] with given f and z?