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

Not optimized JS output #50

Closed
uMaxmaxmaximus opened this issue Feb 8, 2017 · 3 comments
Closed

Not optimized JS output #50

uMaxmaxmaximus opened this issue Feb 8, 2017 · 3 comments

Comments

@uMaxmaxmaximus
Copy link

uMaxmaxmaximus commented Feb 8, 2017

image

compile to:
image

C++ Cat constructor is empty, but in 6 line is called.
And overall output contains many unused items.
I realize this is very little overhead, but it would be nice to remove.

@uMaxmaxmaximus
Copy link
Author

C++ code
image

JS output code
image

Must be:
image

@uMaxmaxmaximus
Copy link
Author

image

Must be:
image

@carlopi
Copy link
Contributor

carlopi commented Feb 22, 2022

Hi @uMaxmaxmaximus, thanks for your contribution, I did take some time to review this various items and connected idea and I am incline to close this issue as out of scope for the Cheerp compiler.

While there is a value in identifying possible improvements, and this ideas have been noted down, things like initialization of variables mostly count in smallish function and I doubt this to have significant impact in more complex cases.

@carlopi carlopi closed this as completed Feb 22, 2022
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