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
Introducing PeepholeCombineArrayPush #3338
Introducing PeepholeCombineArrayPush #3338
Conversation
Created Google internal issue b/130801558. Assigning to @brad4d for review. |
5b8e2c5
to
02f8be4
Compare
Overall this optimization doesn't strike me as a very useful one. Execution time is precious for large projects. Do you have a use-case in which the code size savings from this optimization will justify the time spent in looking for places where it can be done? |
I agree. I was hunting for an issue to contribute to a compiler related project, and this one seems like a challenge that I would like to get started on, so I did it. It was marked help wanted and was commented as a good first issue, so I took it on, without a second thought. In retrospect, I probably should have considered the cost/benefit for the optimization.
@dan1wang, can you help us to understand why do we want this optimization? |
0f89b7a
to
45c753d
Compare
I think the optimization is useful only if the original array is pretty large. I don't know of a use-case where that's the case (I did find this ugly code, though: https://github.com/nemac/seldon/blob/master/areas.js). I think it would be more worthwhile to address issue #3211 ( |
Sounds like we've agreed to close this PR. |
@brad4d Can you please recommend an issue that is good? |
Fixes issue #3212