Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write up Performance Guide for JS Best Practices #6

Open
dignifiedquire opened this issue Nov 22, 2016 · 1 comment
Open

Write up Performance Guide for JS Best Practices #6

dignifiedquire opened this issue Nov 22, 2016 · 1 comment
Assignees
Labels

Comments

@dignifiedquire
Copy link
Owner

  • https://github.com/mraleph/irhydra
  • node --prof and node --prof-process
  • Chrome JavaScript profile
  • asm.js http://asmjs.org/
  • benchmark.js
  • measure, measure, measure
  • hot code paths
  • the fastest code is the one that doesn't run
    • early exits
    • reuse variables to avoid memory allocations
  • Types are important
    • arrays
      • fixed sized arrays are better than growing & shrinking
      • all elements in an array should be of the same type (ideal 32 bit ints)
    • initialise variables with the correct type
    • avoid using objects
    • don't resize buffers
@dignifiedquire dignifiedquire self-assigned this Nov 28, 2016
@daviddias daviddias added backlog and removed ready labels Jan 29, 2017
@daviddias daviddias added ready and removed backlog labels Oct 17, 2017
@daviddias daviddias changed the title Write up perfomance guide Write up Performance Guide for JS Best Practices Oct 17, 2017
@daviddias
Copy link
Collaborator

@dignifiedquire 🙏🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants