-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
STY: Boolean values for bint variables #33008
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
STY: Boolean values for bint variables #33008
Conversation
Looks fine. Any reason to suspect a performance impact? (for this one id look at the generated C code and see if it suddenly became more verbose) |
I looked a the generated C-code, there is no difference (except for the comments that show the equivalent code at the |
Can you run benchmarks to be sure? |
Sure! |
also you can run |
@jreback I have done both, and the result are the same. I also did a small POC, what I did was: Created a file called def f(bint VAR_NAME=0):
pass then ran: cython -3 foo.pyx
mv foo.c foo_ZERO.c # So future diff won't have diffs related to the file name.
rm -f foo.* # Was afraid that cython uses same file name as cache or something crazy like that then I rewrote def f(bint VAR_NAME=False):
pass and then I ran: cython -3 foo.pyx
mv foo.c foo_FALSE.c and then I checked via vimdiff foo_ZERO.c foo_FALSE.c I have also included the two files generated in the POC |
Thanks! |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff