Javascript:SpiderMonkey:OdinMonkey: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Wipe contents of old stuff.)
 
(148 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Active ==
OdinMonkey was the optimizing AsmJS compiler.  
* Cache compiled asm.js modules: works in the shell ({{bug|900669}}), browser integration in progress ({{bug|929236}}).
* Math.fround is in ES6 and SpiderMonkey and optimized in Ion.  Do some more benchmarking, evangelize the general optimization to other engines, and then add to asm.js/Odin ({{bug|904918}}))
* Standardize then implement SIMD extensions to JS ({{bug|894105}}) and then incorporate into asm.js (TODO: bug)
* Land experimental SharedArrayBuffer (pref'd off, {{bug|933001}}) and use this to add experimental pthreads support to Emscripten and evaluate on threaded codebases in preparation for a standards proposal.


== Planned next projects ==
* Add stack-walking support for asm.js code:
** Per-function information in the builtin FF profiler
** Make asm.js calls show up in Error.stack.
* Standardize then implement an ArrayBuffer.resize ({{bug|927182}}, to allow growable heap) and ArrayBuffer.discard ({{bug|855669}}, to allow madvise(DONTNEED))
== Possible next projects ==
* Experiment with using LLVM as the compiler backend for asm.js code.
* Extend asm.js to better support dynamically linking asm.js modules (a mutable, callable array argument to asm.js module, like the PLT)
* Add enough try/catch to asm.js to allow compilation of C++ exceptions using the zero-cost implementation strategy
* Start general JS parsing before the entire JS script has completed downloadeding so that asm.js compilation can overlap
* Standardize and implement value objects ({{bug|749786}}) then add int64/uint64 to asm.js
* asm.js parser : {{bug|854061}}
* Support GC allocated Java-like objects to allow asm.js generation from JVM/CLR bytecode.  Use [http://wiki.ecmascript.org/doku.php?id=harmony:typed_objects Typed Objects] to describe class structure.  Use real vtables.
* fall back to baseline jit for very large functions (maybe not necessary with Emscripten [http://mozakai.blogspot.com/2013/08/outlining-workaround-for-jits-and-big.html outlining]): {{bug|875174}}
* FunctionFuture : {{bug|854627}}
== Potential backend optimizations ==
* native vs. asm.js differential profiling : {{bug|861440}}, {{bug|863924}}
* Revisit primary Ion algorithms (phi placement, gvn, regalloc) to avoid the quadratic blowup we see on huge functions (be more like LLVM)
* improve heap access performance : {{bug|865516}}, {{bug|865523}}, {{bug|869606}}, {{bug|870743}}, {{bug|897425}}
* improve x86/ARM asm.js-to-asm.js ABI : {{bug|861785}}
* further improve FFI calls : {{bug|882399}}, {{bug|886411}}
* Optimize calls into asm.js code (to avoid the general CallAsmJS C++ trampoline.
* Use a signal handler to:
** remove stack overflow checks
** remove idiv branching
** remove double-to-int conversion branching (see also {{bug|818750}})
* Use useAny when lowering new AsmJS MIR nodes
* Optimize CFG to minimize branching : {{bug|844779}}
* Don't spill non-volatile registers at calls out to C++
* Align loop headers on natural boundaries : {{bug|867001}}
* Further optimize multiplication by a constant to use lea tricks for small constants (e.g. x*3 == x<<1+x)
== Current asm.js spec bugs ==
https://github.com/dherman/asm.js/issues?state=open
== Logo ==
[[File:Odinmonkey800.jpg]]<br>
[[File:Odinmonkey800.jpg]]<br>
Credit to John Howard
Credit to John Howard

Latest revision as of 20:55, 27 April 2021

OdinMonkey was the optimizing AsmJS compiler.

Odinmonkey800.jpg
Credit to John Howard