Skip to content

Closure Compiler Advanced Opts #4

Open

Description

@kripken

It looks like only simple but not advanced opts are used. However advanced opts usually give a 50%-100% speedup (+smaller code).

Is there a reason for not using advanced opts? Do you need any help with something there?

Activity

  1. max99x commented on Oct 12, 2011

    @max99x
    Contributor

    Advanced opts don't work in some browsers. I'm afraid I don't remember which browsers were particularly problematic, but I can probably dig it up. For that matter, Opera breaks even with normal closure opts, so repl.it serves it an unclosured version. On a related note, reloop is much slower on Chrome (unlike Firefox), so that's served its special version too. The browser-file mapping is defined here.

    Regarding performance, IIRC after the eliminator is run, Closure's effect is minimal in terms of runtime performance (but of course download time is much improved).

  2. kripken commented on Oct 12, 2011

    @kripken
    Author

    Very interesting.

    I did some comparisons in the emscripten benchmarks, with either the eliminator, or closure, or both. Mostly the eliminator is about the same as closure, as you said (it's even a bit faster sometimes). However it is significantly slower in the raytrace benchmark, I suspect due to lack of inlining. I tend to suspect Python would benefit from inlining too, but I could be wrong.

    Did you try with typed arrays (1 and 2)? How about QUANTUM_SIZE=1? (I assume the latter would not work, though)

  3. max99x commented on Oct 13, 2011

    @max99x
    Contributor

    IIRC my tests on Python produced negligible differences between Closure simple and advanced, but I'll recheck it next time I rebuild Empythoned. Haven't tried typed arrays or QUANTUM_SIZE=1 yet, since the performance we got was sufficient for a REPL, and I was too lazy to debug the issues that these optimizations might cause. Same as above, I'll give them a shot next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions