Javascript:SpiderMonkey:OdinMonkey: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
== Active ==
== Active ==
* Fix lazy-parsing/decompression memory-spike and performance hit for huge js files ({{bug|938385}}).
* Reevaluate throughput now that we have float32.
* Record enough information at compile time so that asm.js functions show up in:
* Record enough information at compile time so that asm.js functions show up in:
** the builtin FF profiler ({{bug|947996}})
** the builtin FF profiler ({{bug|947996}})
Line 7: Line 9:


== Planned next projects ==
== Planned next projects ==
* Reevaluate throughput now that we have float32:  When we are >2x native, why?  Any more categorical fixes (other than SIMD)?
* Remove parsing limitations associated with huge JS files:
** Fix lazy-parsing/decompression memory-spike and performance hit for huge js files ({{bug|938385}}).
** Remove num-locals ({{bug|916612}}) and num-lines ({{bug|916564}}) parser limits.
* Mitigate 32-bit OOM problems: ({{bug|865959}})
* Add && and || to asm.js to avoid sub-optimal control flow ({{bug|919052}}).
* Add && and || to asm.js to avoid sub-optimal control flow ({{bug|919052}}).
* Add missing math constants ({{bug|878488}})
* Add missing math constants ({{bug|878488}})
* Remove num-locals ({{bug|916612}}) and num-lines ({{bug|916564}}) parser limits.
* Mitigate 32-bit OOM problems: ({{bug|865959}})


== Possible next optimization projects ==
== Possible next optimization projects ==

Revision as of 06:04, 21 December 2013

Active

  • Fix lazy-parsing/decompression memory-spike and performance hit for huge js files (bug 938385).
  • Reevaluate throughput now that we have float32.
  • Record enough information at compile time so that asm.js functions show up in:
  • Standardize then implement SIMD extensions to JS (bug 894105) and then incorporate into asm.js
  • 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

Possible next optimization projects

  • Experiment with using LLVM as the compiler backend for asm.js code.
  • Compress asm.js cache entries
  • Further improve load-time:
    • Start general JS parsing before the entire JS script has completed downloading so that asm.js compilation can overlap
    • asm.js parser: Avoid building an intermediate parse tree; type check during recursive descent bug 854061
  • Improve heap access performance : bug 865516, bug 865523, bug 869606, bug 870743, bug 897425
  • Further improve FFI calls : bug 882399, bug 886411, also stop spilling non-volatile registers
  • Improve x86/ARM asm.js-to-asm.js ABI : bug 861785
  • Extend the asm.js signal handler tricks to:
    • Remove stack overflow checks
    • Remove idiv branching
    • Remove double-to-int conversion branching (see also bug 818750)

Possible asm.js extensions that don't extend JS

  • 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
  • Add DataView to avoid the alignment mask on asm.js heap accesses (this is mostly a problem of DataView being slow in all browsers)

Proposed future JS features that would be useful to asm.js

  • ArrayBuffer.prototype.resize (bug 927182): to allow growable heap
  • ArrayBuffer.prototype.discard (bug 855669): to allow madvise(DONTNEED)
  • FunctionPromise: bug 854627
  • Typed Objects: (Typed Objects)
    • This feature comes with float32/uint64/int64 value types, which would be useful as scalar types in asm.js.
    • Formalize Typed Object "class declarations" in asm.js which could make asm.js a target for JVM/CLR/TypeScript (and allow these languages to reuse the builtin JS GC)

Current asm.js spec bugs

https://github.com/dherman/asm.js/issues?state=open

Odinmonkey800.jpg
Credit to John Howard