Last Comment Bug 650071 - Optimize |arguments| usage better
: Optimize |arguments| usage better
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
-- normal with 1 vote (vote)
: ---
Assigned To: general
: Jason Orendorff [:jorendorff]
Depends on:
Blocks: 650063
  Show dependency treegraph
Reported: 2011-04-14 11:54 PDT by David Mandelin [:dmandelin]
Modified: 2011-10-18 09:30 PDT (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image David Mandelin [:dmandelin] 2011-04-14 11:54:21 PDT
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);
Comment 1 User image Tom Schuster [:evilpie] 2011-04-14 12:19:48 PDT
Maybe have a look how much Bug 616744 would help here.
Comment 2 User image Tom Schuster [:evilpie] 2011-10-18 09:30:04 PDT
Fixed by TI, SSA arguments optimization.

Note You need to log in before you can comment on or make changes to this bug.