| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
instruction after _CONTAINS_OP_SET by setting the return type to bool.
| x = 0 | ||
| s = {1, 2, 3} | ||
| for _ in range(n): | ||
| a = 2 | ||
| in_set = a in s | ||
| if in_set: | ||
| x += 1 |
There was a problem hiding this comment.
We might be able to simplify this further, I wasn't sure how much the peepholer would optimize out if I used e.g. 2 in s directly.
Sorry, something went wrong.
There was a problem hiding this comment.
2 in s would have been fine, but this works well too!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
For context: #130415 (comment)
I did run make regen-cases and made sure that the test failed before making the change in optimizer_bytecodes.c :)