3 ms·
How has this been here for 30+ minutes and no one has posted the complexity of the Linux kernel, gcc compiler, and of course the complexity program itself?
by wspeirs 11y ago
How has this been here for 30+ minutes and no one has posted the complexity of the Linux kernel, gcc compiler, and of course the complexity program itself?
- anc84 11y agoHow is your comment 24 minutes old and you haven't done it yourself? ;)
- wspeirs 11y agoHa... I started on the kernel, but it couldn't parse it, so I gave up :-(
- dalke 11y agohttp://www.cnx-software.com/2016/03/01/gnu-complexity-command-line-tool-measures-complexity-of-c-code/ http://www.cnx-software.com/2016/03/01/gnu-complexity-comman... looks at part of the Linux kernel using this specific version of GNU complexity. Complexity analysis of this sort is decades old. McCabe complexity is from 1976. So it's not like no one has done something like this before. Some papers which have done a complexity analysis of the Linux kernel are: http://oai.dtic.mil/oai/oai?verb=getRecord&metadataPrefix=html&identifier=ADA403525 http://oai.dtic.mil/oai/oai?verb=getRecord&metadataPrefix=ht... and http://www.cs.huji.ac.il/~feit/papers/MCC12ICPC.pdf http://www.cs.huji.ac.il/~feit/papers/MCC12ICPC.pdf . For more examples, see https://scholar.google.com/scholar?q=complexity+of+the+Linux+kernel+McCabe&btnG= https://scholar.google.com/scholar?q=complexity+of+the+Linux... . The documentation includes an example of running the complexity program on itself. http://www.gnu.org/software/complexity/manual/complexity.html#Example-Output http://www.gnu.org/software/complexity/manual/complexity.htm... If it's that interesting to you, why not do it for yourself and report the results.
- jhallenworld 11y agoWell I had to try this on JOE, the highest score is: 1613 359 325 regex.c(1260): joe_regexec The manual has: ‘50-99’ Unmaintainable code. ‘100-199’ Crazy making difficult code. ‘200+’ I only wish I were kidding. Score | ln-ct | nc-lns| file-name(line): proc-name 4707 3815 2838 lib/vasnprintf.c(1747): VASNPRINTF The golang compiler should include this technology and refuse to compile files which it decides are too complex for you to maintain.
- mmargerum 11y agoDoesn't go compile itself now?