Changes

Jump to: navigation, search

JaegerMonkey

66 bytes added, 00:16, 5 May 2010
no edit summary
== Major Optimizations<br> ==
[Updated 4 May 2010]
First, how far do we have to go? The rough numbers on our reference machine are (arewefastyet.com):
{| width="50%" cellspacing="1" cellpadding="1" border="0"
|-
|
| align="right" | '''SunSpider (ms)'''
| align="right" | '''v8-v4 (ms)'''
|-
| Current score| align="right" | 1150
| align="right" | 9100
|-
| Target score| align="right" | 400
| align="right" | 2300
|-
| Needed improvement| align="right" | 750
| align="right" | 6800
|}
Now, how do we get there?
{| width="95%" cellspacing="14" cellpadding="1" border="0"
|-
| '''Optimization'''| align="right" | '''SunSpider improvement &nbsp; (ms)'''| align="right" | '''v8-v4 improvement (ms)'''| align="right" | '''Size (wks)'''
| '''Candidate Assignee'''
|-
| Globals| align="right" | 100| align="right" | 1000| align="right" | 2
| dvander
|-
| Regexes| align="right" | 25| align="right" | 300| align="right" | 2-8
| cdleary,intern
|-
| Strings| align="right" | &nbsp;???| align="right" | &nbsp;???
| align="right" |
|
|-
| Dates| align="right" | &nbsp;???| align="right" | &nbsp;???
| align="right" |
|
|-
| Math| align="right" | &nbsp;???| align="right" | &nbsp;???
| align="right" |
|
|-
| jsvals| align="right" | *300| align="right" | *2500| align="right" | 8
| lw+others
|-
| Compiler fast paths| align="right" | *325| align="right" | *3000| align="right" | 8
| dvander+others
|}
A (* ) means the improvement value is just a guess. Values without stars are based on some kind of measurement.
Description and comments for each item:
*[https://bugzilla.mozilla.org/show_bug.cgi?id=561218 Globals]. This means optimizing global variable access with fast paths. dvander has already started this and has wins of 50/500 ms (SS/v8) so far.
*Regexes. There are some regexes we don't compile in SunSpider and v8. There is only one in SunSpider and it would not be hard to extend our current compiler to handle that case. v8 has more, and we don't know which ones count yet and what features are needed.<br>The regex project could be completed either by improving our regex compiler, or just taking yarr from JSC. The latter should be preferred if possible. The licensing on yarr is OK, but it uses vector and unicode classes that are GPL&nbsp;and would need to be replaced.*Strings, Dates, Math. These are key runtime functions. They may be very fast already, or we might have some functions that are slower than they could be. We are doing measurements now.*[https://bugzilla.mozilla.org/show_bug.cgi?id=549143 jsvals]. This is the 128-bit jsvals. This may not turn out to be a huge speedup all on its own, but together with the compiler fast paths it will be very important.
*Compiler fast paths. This means making the JIT inline all commonly run ops. There are probably about 50 of them. This is partially blocked on the new jsvals, because the code generation depends somewhat on the jsval format. But we could start these before finishing the jsvals are done, and patch things up as needed.
313
edits

Navigation menu