Java code optimization tips and tricks

Specifically looking for Java code tips and tricks of the trade for:

  • reducing memory footprint
  • increasing performance
  • Personally would like to see answers focusing on the "how" and not the "when" as the consensus among savvy developers is that early optimization is a bad idea as you don't have anything to profile and thus don't know what the actual bottlenecks will be.

    "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil"

    "In established engineering disciplines a 12 % improvement, easily obtained, is never considered marginal and I believe the same viewpoint should prevail in software engineering"

    Donald Knuth

    链接地址: http://www.djcxy.com/p/6738.html

    上一篇: O八岁?

    下一篇: Java代码优化技巧和窍门