Array vs Bundle vs Table

Array vs Bundle vs Table

durga_ghosal1
Not applicable
27 Views
4 Replies
Message 1 of 5

Array vs Bundle vs Table

durga_ghosal1
Not applicable

[ FlexSim 17.1.6 ]

I am trying understand which one has maximum impact on speed of model run, managing the data in Array vs Bundle vs Table.

0 Likes
Accepted solutions (1)
28 Views
4 Replies
Replies (4)
Message 2 of 5

JordanLJohnson
Autodesk
Autodesk

This very much depends on what you want to do. All three are just about equally fast for read speeds. Bundles are the most memory efficient, storing very little data besides the actual values. Bundles can also be indexed for quick lookup. Tree tables and arrays are more memory intensive, but they can store a much wider range of values, including nodes, or even other tree tables or arrays. Usually, I would prefer the tree table over the array, because the interface for working with tree tables makes it much easier to see what's going on.

.


Jordan Johnson
Principal Software Engineer
>

Message 3 of 5

durga_ghosal1
Not applicable

I am working on a model which might have more than 40,000 rows of data, which method would be the best method. I would have to read the data and also maintain log of the data.

0 Likes
Message 4 of 5

SCHamoen
Advisor
Advisor

@Durga Ghosal Considering all the variables involved (how do you write, read from it, using queries or not, using loops, having index hashes etc.) the best way is too simply create a large table with data ( copy from Excel) and do some tests to check what takes the most time considering the things you want to do with it.

0 Likes
Message 5 of 5

matt_long
Not applicable
Accepted solution

With so many rows of data I would either use a table or a bundle. As stated by Jordan, a bundle will be the most memory efficient, but you can only store numbers and strings in a bundle and each column can either be all numbers or all strings.

Using a Global Table you can set the data to be a node table (the default) or check the box to have it use a bundle. There's really no difference in the interface between the two. The code for accessing values in the table/bundle will also remain the same so it's not hard to switch back and forth between the two methods and test your speed as Steven says.

0 Likes