8000 gh-100239: specialize bitwise logical binary ops on ints by iritkatriel · Pull Request #128927 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-100239: specialize bitwise logical binary ops on ints #128927

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

Merged
merged 13 commits into from
Jan 29, 2025
Merged
Prev Previous commit
Next Next commit
add checks in test
  • Loading branch information
iritkatriel committed Jan 17, 2025
commit 01734132922aced596f3448bd97f104df976c408
5 changes: 4 additions & 1 deletion Lib/test/test_opcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -1364,10 +1364,13 @@ def binary_op_add_extend():

def binary_op_bitwise_extend():
for _ in range(100):
a, b = 1, 2
a, b = 2, 7
x = a | b
self.assertEqual(x, 7)
y = a & b
self.assertEqual(y, 2)
z = a ^ b
self.assertEqual(z, 5)

binary_op_bitwise_extend()
self.assert_specialized(binary_op_bitwise_extend, "BINARY_OP_EXTEND")
Expand Down
0