Javascript:SpiderMonkey:OdinMonkey: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
(Wipe contents of old stuff.)
 
Line 1: Line 1:
== Active ==
OdinMonkey was the optimizing AsmJS compiler.  
* Continue iteration on [https://github.com/johnmccutchan/ecmascript_simd SIMD proposal] and implementation/optimization in Ion/Odin.
* [https://github.com/lars-t-hansen/ecmascript_sharedmem SharedArrayBuffer]
** Share source text between workers: {{bug|1211723}}
** Share asm.js machine code between workers: (TODO)
* Baseline compilation: {{bug|1157624}}, {{bug|1169167}}


== Possible further load-time optimizations ==
* Parse and AOT compile while downloading: {{bug|1061886}}
* Remove async-script requirement for asm.js caching:
** Maybe remove it from QuotaManager: {{bug|961057}}
** More likely, just take (large) script parsing off the main thread: {{bug|1084009}}
* Share compiled code between workers: {{bug|1168981}}
== Possible further throughput optimizations ==
* Meta bug: {{bug|1200406}}
* Optimize sin/cos: {{bug|967709}}
* Use callee-saved registers: {{bug|985065}}
* Heap access: {{bug|1145676}}, {{bug|897425}}, {{bug|870743}}, {{bug|983131}}, {{bug|1056027}}, {{bug|1136276}}
* Optimize add-with-overflow: {{bug|1043365}}
* Optimize min/max: {{bug|1060635}}
* For asm.js->asm.js calls on x86, pass the return value via xmm register, not fp stack
* Remove branching from double-to-int conversion using signal handler (see also {{bug|818750}})
* Optimize calls into ({{bug|962641}}), out of ({{bug|1000632}}), and between ({{bug|982036}}) asm.js modules.
* Signed comparisons: {{bug|1141407}}
== Possible asm.js extensions that don't require new JS features ==
* Zero-cost exception handling: {{bug|1065089}}
* Extend asm.js to allow proper tail calls for all return types and do the tail-call optimization
* Effectively support 'goto' (even computed 'goto') by formalizing a pattern of while+switch that gets compiled as if it was goto
* Extend asm.js to better support dynamically linking asm.js modules (a mutable, callable array argument to asm.js module, like the PLT)
* 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 ==
* int64 arithmetic: https://gist.github.com/BrendanEich/4294d5c212a6d2254703
* ArrayBuffer.prototype.discard ({{bug|855669}}): to allow madvise(DONTNEED)
* Typed Objects: ([http://wiki.ecmascript.org/doku.php?id=harmony: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)
* FunctionPromise: {{bug|854627}}, or perhaps just make some functions (asm.js, no-free-variables) structured-cloneable
* Add way to programmatically observe whether asm.js validated: {{bug|952847}}
== Usability improvements ==
* Add about:config option to throw for out-of-bounds or unaligned access ({{bug|1088655}})
* Fix asm.js caching browser interop ({{bug|527667}}, {{bug|1047105}}
== 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