table block growth slow
古いコメントを表示
Hi,
I am trying to fill up a table with mixed data containing cashflows. each mortgage gets multiple lines. Preallocation of a similair table does not seem solve this problem. For preallocation i used repmat to create a table as large as the output containing dummy vars. Because dynamic allocation is complexer to read and gave no performance boost I decided to drop this approach.
The process of dynamically building the table starts out fairly fast but after 35000 iterations, where each adds blocks of about 360 new records, the perfomance decreases very fast. Takes about an hour or more.
enddataset = [dataset;newblock] % dynamic, slows over time
the tictoc slows down. now the weird stuff it that when I use struct it remains fast (11/12 minutes):
myStruct.iterationLabel = newblock. % does not slow over time
As I said using repmat and preallocation does not speed up.
Is it possible to grow a table in a fast manner?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!