Closed Bug 581291 Opened 11 years ago Closed 11 years ago

JM: PIC JSOP_NAME lookups that resolve to the global object

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dvander, Unassigned)

References

Details

Right now a NAME opcode will create a PIC only for call objects. If the holder is the global object, the PIC is disabled. We can do better.

This will probably be a very small win for SS, but bigger for the web in general.

See related bug 489098.
> function f() {
>  eval("for (i = 0; i < 1000000; i++) { }");
> }
> var d = new Date();
> f();
> print(Date.now() - d);

Interesting.

dvander@dvander:~/mozilla/moo/js/src$ ./Opt32/js -m k.js 
12
dvander@dvander:~/mozilla/moo/js/src$ ~/projects/v8/shell k.js 
138
dvander@dvander:~/mozilla/moo/js/src$ ./Opt32/js -j k.js 
2

Anyway, this is about a 1-2ms win on date-format-xparb, removing about 50,000 stub calls.

http://hg.mozilla.org/users/danderson_mozilla.com/moo/rev/05e714a501e9
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.