Please can you suggest me a good book about writing performing and optimized code in Java?
A book that moves from something of “basic” like e.g. “is more performing a static or local variable?” to something more complex.
If it exists of course 🙂
Thank you very much,
Julio
This highly depends on your needs since there are many approaches to optimizing code. I’d say that optimizing on a language level isn’t worth the trouble – you should most probably start learning data structures and algorithm since there you can do most optimisations, and those things are mostly language independent.
Don’t bother whether static or local variables yield better performance, since that also depends on the definition of “performance”.
Is it:
I’d say runtime performance difference on such a low level is quite low and what matters more here are things like readability, maintainability and robustness.
Here’s a suggestion for a book, however: Practical Java.
And another one: Effective Java