我有一些代码,我正在使用项目Euler。就是找出600851475143的最大素数因子。这真的需要很长的时间来运行,至少已经30分钟了。你们能不能看看是因为我的代码太长了,还是我的代码错了。另外,有什么技巧可以让运行时间更快吗?
public static long factor(long rc){
long num = rc;// need to add L to make it compil
编辑:我按照建议使用了分析器,看起来花了大量时间处理符号和求解方程组。所以,我将稍微改变我的问题:是否有更快的方法来实现这个方程组,也许一个不涉及声明符号的方法? % Converts given x and y coordinates into angles (using link lengths)
Le = 0.51435; % in meters y_