简体   繁体   中英

Efficiency mapping plugin for any java IDE

I'm searching for some plugin that can perform this to me (even in similar way): I need a plugin that can map the code efficiency of an object line by line using colors... for example from red to blue making red the lines more "inefficient" (or, easier.. that takes more time) down gradually to blue the most efficient ones. Is there something? If not, I think I'll build it if someone needs beyond me. Do you think you would find it interesting? Thanks in advance.

The time a line of code take is usually in nano-seconds (one millionth of a milli-second) and the time it takes to measure time is about the same. Sometimes the operation takes a fraction of the time that it takes to get the nanoTime().

Code runs faster as it is optimised dynamically and how long it takes depends on the inputs you use. This means that a line which takes say 100 micro-seconds can take 1 micro-seconds later.

If a line of code takes 10 micro-seconds, is that efficient or inefficient? You would have to compare it to how else it could have been implemented.

What you can to is use static code analysis for common performance mistakes. IntelliJ has about 30 checks for common inefficiencies with auto-fixes. I suggest you look at the code analysis in IntelliJ. The code might still be inefficient but you will at least fix things so obvious a program can fix the code for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM