The biggest difference is that a flattened array has the advantage that you only need to do one memory access to retrieve or set a value. In a jagged array, you need two memory accesses: one to the external array and one to the internal array.
A solid array can also work better than a jagged array, since it will be allocated in a contiguous manner in memory. This means that referenced and CPU caching can help improve performance. A jagged array does not guarantee that each auxiliary array is located next to the memory and will limit the benefits of cache localization.
In practice, the only way to answer questions about performance is to try in both directions and measure the results.
source share