|
1
不存在。
|
|
2
目测算法。。。
|
|
zhoulujueMay 29, 2014
3
静态分析工具,多的是。
|
|
imxzMay 29, 2014
5
是想问 大O 吗 ?
|
|
MutooMay 29, 2014
6
大O表示法,在 Mark Allen Weiss 的《数据结构与算法分析》里面有专门一章节介绍,而且有好几章节的案例分析。
|
|
akfishMay 29, 2014
12
|
|
13
Mathematically, the cyclomatic complexity of a structured program[a] is defined with reference to the control flow graph of the program, a directed graph containing the basic blocks of the program, with an edge between two basic blocks if control may pass from the first to the second. The complexity M is then defined as[2]
M = E − N + 2P, where E = the number of edges of the graph. N = the number of nodes of the graph. P = the number of connected components (exit nodes). 够严谨了吧。 |
|
14
Sonar 有计算复杂度的。但是没有什么算法,都是针对循环,判断之类的识别。以及空引用高危判断。
ps:我说的是java ,其他不知道 |
|
fzssMay 29, 2014
15
ORDER OF GROWTH
|
|
16
|
|
17
一开始不需要过度优化,后面针对具体的瓶颈优化就好了。
拿循环做复杂度其实也挺逗的,谁知道函数嵌套了多少个函数,更不要说大部分不间断的程序都是死循环,你没看到只是因为别人都封装好了。 代码里不推荐多个嵌套循环这是必然的,但纯拿循环来说性能就和拿代码行数算KPI一个道理,况且计算机就是一个大循环。 |
|
ruandaoMay 29, 2014
18
时间复杂度?
空间复杂度? 还是逻辑复杂度? |
|
lijinmaMay 29, 2014
19
@soundbbg 拿循环说性能挺逗?大哥,那你觉得纯研究算法的是靠什么来做标准?还不是靠循环,你这是藐视算法分析;
一个算法在数据很小的时候没多大作用,但是在数据很大的时候,n^2 和 n 那得有多大差距啊; 敢问兄弟,不靠循环,你靠什么来评判一个算法的时间复杂度? |
|
akfishMay 30, 2014
24
@karlxu 正经的方法是把编译器前端部分做出来,解析源代码生成AST(抽象语法树),剩下的事情就是一堆图算法去撸而已。
这部分的研究很成熟了,各种IDE高上洋的代码自动完成、重构、分析工具都是这样实现的。 |
|
26
|
|
wecingJun 1, 2014
27
我只知道停机问题。
|