小编Jon*_*Jon的帖子

斐波那契的表现

f[0] = 0;
f[1] = 1;
f[x_] := f[x-1] + f[x-2]
Run Code Online (Sandbox Code Playgroud)

这个功能在Mathematica中运行缓慢,我需要提高速度.我必须使用函数式编程和递归.我不确定为什么这么慢,甚至最轻微的想法如何改善这将是有帮助的.

performance wolfram-mathematica fibonacci

6
推荐指数
1
解决办法
1607
查看次数