speed up max function
6 ビュー (過去 30 日間)
How to speed up max function? The following line [a,b] = max(c(1:24,1,2,3)) takes 2685.49s for calling 541390285 times. Is there any way to speed up?
[a,b] = max(c(1:24,1,2,3));
dpb 2018 年 4 月 12 日
A significant fraction is undoubtedly the addressing of the 4D array; the same fragment but
[a,b] = max(d);
cut the time by almost 50%. Whether the real application allows that simplification is unknown, but the concept of reducing the data structure overhead is key one.