Asv3's Blog

September 5, 2013

JavaScript Performance Tips

Filed under: Uncategorized — Tags: , , — asv3 @ 4:54 pm
  • avoid loops

  • avoid unused code

  • avoid loging

  • using strict mode

  • use === instead of == (browser has more clarity)

  • exploit hoisting

  • use hasOwnProperty

  • use local references for values that have deeper resolution path

  • avoid synchronous calls

  • minimize dom updates

  • minimize style updates

  • use fragment whenever applicable

  • avoid (for i in) on objects

  • exploit power of mapping

  • have a check on prototypal inheritance

Blog at WordPress.com.