issues
search
dignifiedquire
/
borc
Assimilate your JavaScript objects into cbor
https://dignifiedquire.github.io/borc
MIT License
31
stars
22
forks
source link
Write up Performance Guide for JS Best Practices
#6
Open
dignifiedquire
opened
7 years ago
dignifiedquire
commented
7 years ago
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
daviddias
commented
6 years ago
@dignifiedquire 🙏🏽
node --prof
andnode --prof-process