-
Notifications
You must be signed in to change notification settings - Fork 795
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
Optimize for i in [0 .. 10] do something #377
Comments
non-integer for loops, and loops with non-1 steps are also a problem for the same reason: |
I'm tempted to blame the user for part (A) - they asked for a list, so they got a list... That's why the @braden yes, there are a bunch of gaps there, which might represent relatively low-hanging fruit for anyone interested in codegen optimizations. |
yes, a list is a list 😄 but is an easy target for an optimization. |
Agreed, great walkthrough. User's profile mentions T4, I wonder if it is @mrange? |
Yes it was me that wrote that SO post. I am actually working the SO post into something of a blog post explaining (hopefully) how to do a expression optimization. The blog post will contain functionality and IL generation tests as well. The plan is to end the blog post by posting it as a PR to F# (with the possibility it gets rejected which is also a good learning ;)) |
WRT to IIRC these changes required changes the AST and pickle.fs which always scares me. |
@mrange please do it |
In case you are interested in giving feedback on the blog post please see: https://mrange.wordpress.com/?p=706&shareadraft=5536c7f96b8a5 The SO post was skimped over how to do testing which I included in the blog. That of course made it bigger. @sergey_tihon has some feedback where he was asking for a better introduction so I tried to address that to. |
@mrange sent feedback! thx |
from Stackoverflow
from @tpetricek tests:
I added this because there is a really good walkthrough by stackoverflow user fulesnabel
with his answer i think is can be a
upforgrab
performance
tagsThe text was updated successfully, but these errors were encountered: