Hello,
I am working with some pretty hefty data structures, namely an array, in which each element is an array, in which each element is an array of objects.
The current implementation is focussed towards tidy and efficient code. Each layer of the pyramid is composed of a cell array of handle objects, whose properties are a cell array for the next layer plus various related statistics, and whose methods are processing steps for that layer. The disadvantage of this implementation is that fetching a property from an object at the deepest level is slow, about 100-200 microseconds.
I would now like to reimplement the code to run quickly, and both intuition and some quick tests show that using simple nested cell arrays or structure arrays will be about 10 times faster. So...
1. Would my original object-based code run faster with value objects instead of handle objects? Would using object arrays make it faster?
2. Is the speed of fetching elements faster from a cell array or a structure array, or are they the same?
3. Am I missing a far more elegant way to solve this problem? (I strongly suspect that I am)
Thankyou! Pete