-
Notifications
You must be signed in to change notification settings - Fork 170
Overload all existing built-in functions #250
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
Conversation
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 think this looks good! Very helpful, this makes the intrinsic functions pretty much usable now.
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 think that looks good.
I wonder what the purpose of the pow
function is, when we have **
in Python.
Perhaps once we add support for the third (optional) argument in Have you heard about aliasing and chunking? This Pytalk by Raymond is really good: https://www.youtube.com/watch?v=UANN2Eu6ZnM (start from 8:50) |
Not using this name. How does it apply here in your opinion? |
I think what Raymond wants to convey is that instead of doing computationally-expensive tasks repeatedly, we can have functions (that would do it efficiently), thereby reducing the "registers" and maintaining our cognitive capacity. I am sure he can explain it much better! |
Yes, you don't want to have too large loop body, otherwise you run out of registers. The compiler's unrolling facility must unroll in order to vectorize well, but not too much to run our of registers. Regarding using functions to structure your code, that seems obvious. I don't now how it applies to this PR though. :) |
abs
round
pow