Performance of importData(9)

Performance of importData(9) - 消息

#1 已发布: 2013/8/19 12:16:38
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: Moderator

Perhaps not a bug, but a problem. The importdata(9) function has a quadratic dependence of time consumption versus datasets read. For large files this becomes prohibitive. Pre-allocation of the matrix does not help.

If you read the file piecewise into separate matrices, then the time consumption is
linear. However, combining them using stack() turns out to be even more ineffective. Other operations like column extraction or plotting augmented columns fast in comparison to read operation. Therefore, an efficient text file reading routine would be highly welcome.

If you want to try the example, put data and .sm file in the same directory and launch the .sm file there.
readtest.PNG
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1位用户喜欢此帖子
Radovan Omorjan 2013/8/19 12:46:00
#2 已发布: 2013/9/8 06:17:20
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: Moderator

Problem solved. The quadratic time dependence holds for optimization> symbolic. For optimization> numeric, the time dependence is approximately linear.
DataExchange.zip (381.39 KiB)已下载 440 次。
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
  • 有新帖
  • 无新帖