• Optimize only if the program is important and it is genuinely slow.
  • Don’t tune anything without using a good profiling tool first that can help find the hotspots in a program.
  • Enable compiler optimizations to help improve runtime.
  • Tune the code by collecting common subexpressions, replacing expensive operations, eliminating loops, caching frequently used values or rewriting in a lower-level language.
  • Include code inspection into your governance models to remove inefficient snippets.

Full post here, 7 mins read