While JS support multi-thread, but not multi-core processing. HTML5 Web Workers allow multiple isolated processes to be run concurrently, each process have to communicate with each other via JSON strings.
Serializing and parsing objects to JSON is slow, and means multiple copies of the same data exist, probably way too much memory usage and overhead.
However: Web Workers could be used to do computation without blocking main thread. Can be in future work
asm.js, amost no GC, may be faster for Ahead-of-time compilation
WebAssembly, should have speed up
### Loop For-of, For inverse
Bench: https://jsperf.com/cache-length-no-cache https://jsperf.com/for-loop-research https://www.incredible-web.com/blog/performance-of-for-loops-with-javascript/
__Done__
Justify by showing in isolated case is enough.
### Reduce property lookup of an object
### Reduce GC
https://stackoverflow.com/questions/18364175/best-practices-for-reducing-garbage-collector-activity-in-javascript#18411275
Don't declare stuff often. `delete` doesn't help.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete
Becnhmarks on clear array: http://jsben.ch/hyj65
__ Can't do much from now__
### Multi-core
While JS support multi-thread, but not multi-core processing. HTML5 Web Workers allow multiple isolated processes to be run concurrently, each process have to communicate with each other via JSON strings.
Serializing and parsing objects to JSON is slow, and means multiple copies of the same data exist, probably way too much memory usage and overhead.
However: Web Workers could be used to do computation without blocking main thread.
**Can be in future work**
### asm.js, amost no GC, may be faster for Ahead-of-time compilation
### WebAssembly, should have speed up
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Loop For-of, For inverse
Bench: https://jsperf.com/cache-length-no-cache https://jsperf.com/for-loop-research https://www.incredible-web.com/blog/performance-of-for-loops-with-javascript/
Done
Justify by showing in isolated case is enough.
Reduce property lookup of an object
Reduce GC
https://stackoverflow.com/questions/18364175/best-practices-for-reducing-garbage-collector-activity-in-javascript#18411275
Don't declare stuff often.
deletedoesn't help.https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete
Becnhmarks on clear array: http://jsben.ch/hyj65
__ Can't do much from now__
Multi-core
While JS support multi-thread, but not multi-core processing. HTML5 Web Workers allow multiple isolated processes to be run concurrently, each process have to communicate with each other via JSON strings.
Serializing and parsing objects to JSON is slow, and means multiple copies of the same data exist, probably way too much memory usage and overhead.
However: Web Workers could be used to do computation without blocking main thread.
Can be in future work
asm.js, amost no GC, may be faster for Ahead-of-time compilation
WebAssembly, should have speed up