A Methodology for Fine- Grained Parallelism in JavaScript ...
A Methodology for Fine- Grained Parallelism in JavaScript ...
A Methodology for Fine- Grained Parallelism in JavaScript ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Type Specializ<strong>in</strong>g JITs<br />
Luckily, programmers usually write Type-Stable code:<br />
That is,<br />
a = 1;<br />
b = 2;<br />
if (someth<strong>in</strong>g)<br />
b = 5;<br />
c = a + b;<br />
and not,<br />
a = 1;<br />
b = 2;<br />
if (someth<strong>in</strong>g)<br />
b = “word”;<br />
c = a + b;<br />
Type specializ<strong>in</strong>g, dynamic optimiz<strong>in</strong>g, JIT compilers<br />
• Observe types through profil<strong>in</strong>g or trac<strong>in</strong>g (still emit checks)<br />
• Prove types us<strong>in</strong>g type <strong>in</strong>ference (no checks, research area)<br />
• Generate code specialized to given types<br />
• Google V8 Crankshaft, Mozilla TraceMonkey, JägerMonkey<br />
Good JS per<strong>for</strong>mance requires Type-Stable Code