Skip to content

Instantly share code, notes, and snippets.

@pvenkatakrishnan
Last active August 29, 2015 14:04
Show Gist options
  • Save pvenkatakrishnan/1486035606101081a4d5 to your computer and use it in GitHub Desktop.
Save pvenkatakrishnan/1486035606101081a4d5 to your computer and use it in GitHub Desktop.
Optimizing javascript for v8
  • Small functions < 30 lines
  • Monomorphic (preferable same type arguments)
  • Dont leak 'arguments' or dont pass it around
  • While working with modifying big arrays, better to for loop through it than create new arrays to modify it (apparently iterating is much faster than memory allcocation time)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment