I was wondering if making code more explicit helps Eclipse to analyse it faster. For example, if I declare a class as final
, the code analyser theoretically can skip searching for its descendants when computing type hierarchy.
So, does it really speed things up?
It is possible that using final keyword could be taken advantage by a smart analysis tool, though I would imagine that analysis is done bottom-up in the class hierarchy because a superclass doesn't need to care about subclasses anyway.
However, using final DOES increase runtime performance somewhat due to certain compiler optimizations that are taken advantage of. This is micro-optimizing though; while it's a good practice to use final when appropriate, the performance increases will not be large compared to optimizing the architecture of the program.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With