-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
implement with fewer afoldl methods #39414
Conversation
With constant-propagation, inference (and Varargs runtime) is likely better able to handle this version now (and it removes the n^2 behavior definitions for semi-low argument counts). Now we also need to force Vararg specialization up to 16 arguments manually, so we do that explicitly (and slightly hack-y). Fixes regression in #39175
end | ||
typeof(afoldl).name.mt.max_args = 18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙈
afoldl(op,a,b) = op(a,b) | ||
afoldl(op,a,b,c...) = afoldl(op, op(a,b), c...) | ||
function afoldl(op,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,qs...) | ||
y = op(op(op(op(op(op(op(op(op(op(op(op(op(op(op(a,b),c),d),e),f),g),h),i),j),k),l),m),n),o),p) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know; sad we have to drop one of my favorite lines of code 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh neat approach! :)
Co-authored-by: Jeff Bezanson <jeff.bezanson@gmail.com>
With constant-propagation, inference (and Varargs runtime) is likely better able to handle this version now (and it removes the n^2 behavior definitions for semi-low argument counts). Now we also need to force Vararg specialization up to 16 arguments manually, so we do that explicitly (and slightly hack-y). Fixes regression in #39175 (cherry picked from commit 5cd1e3e)
With constant-propagation, inference (and Varargs runtime) is likely better able to handle this version now (and it removes the n^2 behavior definitions for semi-low argument counts). Now we also need to force Vararg specialization up to 16 arguments manually, so we do that explicitly (and slightly hack-y). Fixes regression in #39175 (cherry picked from commit 5cd1e3e)
With constant-propagation, inference (and Varargs runtime) is likely better able to handle this version now (and it removes the n^2 behavior definitions for semi-low argument counts). Now we also need to force Vararg specialization up to 16 arguments manually, so we do that explicitly (and slightly hack-y). Fixes regression in JuliaLang#39175
With constant-propagation, inference (and Varargs runtime) is likely better able to handle this version now (and it removes the n^2 behavior definitions for semi-low argument counts). Now we also need to force Vararg specialization up to 16 arguments manually, so we do that explicitly (and slightly hack-y). Fixes regression in JuliaLang#39175
With constant-propagation, inference (and Varargs runtime) is likely better able to handle this version now (and it removes the n^2 behavior definitions for semi-low argument counts). Now we also need to force Vararg specialization up to 16 arguments manually, so we do that explicitly (and slightly hack-y). Fixes regression in #39175 (cherry picked from commit 5cd1e3e)
With constant-propagation, inference (and Varargs runtime) is likely
better able to handle this version now (and it removes the n^2 behavior
definitions for semi-low argument counts).
Now we also need to force Vararg specialization up to 16 arguments
manually, so we do that explicitly (and slightly hack-y).
Closes #39175, as this fixes the regression, though it appears in my testing that #35675 also work very well here (permits inlining at a different layer, where it is more effective over a broader scope than just this regression)