-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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):
passthen 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 thatthen I rewrote def f(bint VAR_NAME=False):
passand then I ran: cython -3 foo.pyx
mv foo.c foo_FALSE.cand then I checked via vimdiff foo_ZERO.c foo_FALSE.cI have also included the two files generated in the POC |
|
Thanks! |

black pandasgit diff upstream/master -u -- "*.py" | flake8 --diff