Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closure Compiler Advanced Opts #4

Open
kripken opened this issue Oct 11, 2011 · 3 comments
Open

Closure Compiler Advanced Opts #4

kripken opened this issue Oct 11, 2011 · 3 comments

Comments

@kripken
Copy link

kripken commented Oct 11, 2011

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?

@max99x
Copy link
Contributor

max99x commented Oct 12, 2011

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).

@kripken
Copy link
Author

kripken commented Oct 12, 2011

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)

@max99x
Copy link
Contributor

max99x commented Oct 13, 2011

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants