5
Code optimizer tools aim at, for example:
- Removal of dead code: removes any dead class, attribute, or method code that is not referenced and used in the project.
- Rewrite and reduce functions: rename what is possible to further increase memory usage performance by APP (smaller labels).
- Apply the so-called inlined Method: place constants and methods on the code line.
Based on this, we can note that the main objective of a code optimizer is to decrease the number of methods invoked, as well as variables and constants to be accessed in memory, consequently improving the performance of the application processing. We can also note that the code optimizer not necessarily worry about the readability of the code, it is important to have a copy of the original not optimized for future queries, as is already common to be done when we obfuscate a particular code. Many of the actions done by a code optimizer go unnoticed in the eyes of programmers, because the goal of the professional is to maintain a readable code applying concepts that may be inefficient in processing.
- Compilers can perform a light work of optimization of the code, as some obfuscators also do, in the Java language we have the Proguard and the Dexguard, that optimize and obfuscate the code.
- Dedicated optimization programs 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 the Closure Compiler, that is able to reduce the weight of the codes as well as the consumption of resources in the client machine, just 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 C# tools similar to the one I mentioned here.
Optimize type as?
– Jéf Bueno
If you take a look at the Closure Compiler page you’ll understand better what I mean by "optimization". But, basically these optimizers make code lighter and more efficient at the processing level.
– DanOver
The C# compiler already does this optimization process. On improving readable code, as quoted by Resharper helps a lot, just be careful that no tool will work miracle, after all these tools only advise.
– Gabriel Coletta
@Gabrielcoletta always needs to question the change and understand why it is being made
– Luiz Santos
You want a source improvement counselor or you want something that effectively reduces unnecessary things on target?
– Maniero
I’m half-baked with micro-optimizations. I’m usually more in favor of using a profiler and detect the real bottleneck points, to then propose a suitable solution be peephole or a totally differentiated approach
– Jefferson Quesado
@Jeffersonquesado What is a profiler?
– DanOver
Behold that answer. I believe that in it you find the most appropriate reference for the subject
– Jefferson Quesado
I closed the question because he asks for certain things, including giving examples of similar tools and the answer given talks about a product that does not offer these things and the AP says that was exactly what he wanted. So he doesn’t know what he wants, didn’t properly describe the problem and an answer that doesn’t match the question will be misleading to many people who read here.
– Maniero
@Maniero I rewrote the question, I hope that now everyone can understand it.
– DanOver
@Danover doesn’t think she has any more salvation. She keeps asking for one thing and the answer delivers another.
– Maniero
@Maniero Strange, I read and I could understand that he wanted and then I thought about Resharp. It seems strange, my answer be wrong with so many upvotes. Even worse, the owner himself found the correct answer, it does not seem fair as some fail to understand the question to be closed.
– Luiz Santos
@Luizsantos extenture why it is closed. She says one thing and people understand another. It is the definition of unclear. The votes are because people are getting it wrong and because people like Reshsarper. You have votes for another reason, but that will be dealt with differently.
– Maniero
@Maniero seems subjective to me, but ok. Everything you’re saying seems to be your view of the situation. But, who am I to dispute.
– Luiz Santos
@Maniero However, to be quite honest, this situation is very discouraging and sounds mandatory
– Luiz Santos
@Danover is important that questions lead to creating objective answers and on specific subjects. If the question causes each respondent to choose from what to speak in a blurred manner this question and answer(s) becomes a salad and very difficult to maintain over time. The more specific the question is the better.
– Sergio
I still don’t understand what the question asks exactly. If it is optimization, if it is improvement, and in which of the senses of the question (the answer confuses me even more, although I am not considering it for closure). I do not know if it is broad yet, after clarified.
– Bacco
@Luizsantos , here it seems to me that Resharper does a similar work to what Checkstyle does for Java. And Checkstyle is not seen as an optimizer, it doesn’t actually optimize anything. Proguard, on the other hand, changes compiled code to, for example, minify strings and make loading internal classes faster. So I agree with what Maniero said. On positive score, it may be because your answer contributes to the community in some way, but not necessarily that you contribute by solving the direct problem of the question
– Jefferson Quesado
Got it! Guys, the problem is with the word optimize, optimize does not mean just "let faster" write with less words the same function is an "optimization", there is no link of the word "optimization" with speed, as much as Resharp brings speed. Optimize: create more favorable conditions for; make the best possible use of.
– Luiz Santos
All right, let’s go. After searching I found a software called Eazfuscator.NET (Gapotchenko), this software meets well the requirements highlighted in the question. In short, it is a substitute for Proguarg (widely used by Java users), but Eazfuscator.NET is aimed at the .NET. platform. Like Proguard, it acts by overshadowing and performing tasks of automatic code optimization. There are other features. On the software page (https://goo.gl/YzT4xt), it is possible to check how the automatic code optimization is performed. It is programs like this that the author of the question is looking for.
– DanOver