Reasonable Use of operator priority, performance optimization and improvement details, and operator performance optimization
In JAVA programs, most of the reason for performance problems is not the JAVA language, but the program itself. Developing good coding habits is very important and can significantly improve program performance.
1. Use the singleton whenever possible
2. Avoid using static variables whenever possible
3. Avoid creating too many Java objects.
4. Try to use the final Modifier
5. Use local variables whenever possible
6. Try to handle the places of use of the packaging type and basic type
7. Use synchronized with caution to minimize synchronize.
9. Try not to use the finalize method
......
N. Use shift as much as possible to replace 'a/B 'operations
Reasonable Use of the operator priority can improve the program performance to a certain extent, to achieve some performance optimization.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.