Optimize |arguments| usage better

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: dmandelin, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
From bug 642001 comment 5, we need to make this benchmark faster. One way would be to improve the arguments escape analysis we have. I think v8 might be fast on this mostly because they can allocate |arguments| objects very fast, so this might alternatively be done by waiting for generational GC and then doing arguments a bit differently.

    function sc_Pair() {
    }

    function sc_list() {
        var res = null;
        var a = arguments;
        for (var i = a.length-1; i >= 0; i--)
            res = sc_Pair(a[i], res);
        return res;
    }

    var t0 = new Date;
    for (var i = 0; i < 1000000; ++i)
        sc_list(1, 2, 3);
    print(new Date - t0);
Maybe have a look how much Bug 616744 would help here.
Fixed by TI, SSA arguments optimization.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.