What tools to optimize C # code? [closed]

5

Code optimizer tools aim, for example:

- Code Removal: removes any class code, attribute, or dead method that is not referenced and used in the project.

- Rewrite and reduce functions: rename as much as possible to further increase memory usage performance by APP (smaller labels).

- Apply the so-called Method inlined: put constants and methods in line of code.

Based on this, we can note that the primary goal of a code optimizer is to decrease the number of methods invoked, as well as variables and constants to be accessed in memory, thereby improving processing performance application. It should also be noted that the code optimizer will not necessarily worry about the readability of the code, and it is important to have a copy of the original not optimized for future reference, as is already common practice when we obscure a particular code . Many of the actions taken by a code optimizer go unnoticed in the eyes of programmers, since the professional's goal is to keep code readable by applying concepts that may be inefficient in processing.

  • Compilers can do a light work of code optimization, just as some obfuscators do as well, in the Java language we have Proguard and Dexguard , which optimize and obfuscate the code.
  • Programs dedicated to optimization can make the service more efficient.

Code optimizers are common in interpreted languages, due to the fact that there is no compiler available for such languages. For JavaScript we have Closure Compiler , which is able to reduce the weight of the codes, as well as the consumption of resources in the client machine, only rewriting attributes and methods, logically without changing the final result of the classes.

After this brief summary, I would like to know if anyone knows about C # -based tools similar to the one I cited here.

    
asked by anonymous 16.11.2017 / 16:57

1 answer

7

For C # code enhancement, my favorite is ReSharper . It makes several improvements to the code like:

  • analyze the quality of the code;
  • remove errors and code checks;
  • Safely change the code base;
  • Instantly run through the entire solution;
  • enjoy code editing helpers;
  • meet coding standards.

In my experience I can attest that he has already freed me from:

  • if they would never enter;
  • redundant code;
  • Unnecessary references;
  • code elegance and readability;
  • Rename attributes and classes with greater security.

Super advise.

    
16.11.2017 / 17:07