I have an object containing two cell-Arrays. I know the number of rows but I can only estimate the column-size.
When preallocation the cell-Array (which will contain only chars afterwards), I get way slower code, which I don't understand:
- No Preallocation: 0.4ms per Insertion
- Row Preallocation: 9.8 ms
- Row Preallocation and Estimation of Columns: 95.0 ms
I didn't finish my code, so perhaps the speedup comes at the end? I cannot explain this strange behaviour...