通常是一个问题,如何执行任务,以及区别到底是什么。 众所周知,循环比表操作慢,而矩阵比表操作快。
我制作了一个脚本,该脚本使JMP可以根据表行和方法来计算方列生成的持续时间。 结果如下:
- 表格方法比触摸每个单元格快10倍(每行...)
- 矩阵计算比表格方法快5倍,但更加复杂
在下面的脚本中,您可以用自己的计算替换平方运算以比较性能。

// compares the performance of
// Table calculation
// for each row
// and Matrix calculation
// and writes the result to a table
Names Default To Here( 1 );
perf_test = Function( {rows, type},
// create new table
cdt = As Table( (1 :: rows)`, <<COLUMN names=""></COLUMN>