10+ years here too. Recently forced to switch because it's gotten so bad. Maybe if they aren't working the render engine they will have more time to work on performance.
>>> is_power_of_two(2 ** 31 - 1)
False
>>> is_power_of_two(2 ** 31)
True
>>> is_power_of_two(2 ** 31 + 1)
False
>>> is_power_of_two(2 ** 548 - 1)
False
>>> is_power_of_two(2 ** 548)
True
>>> is_power_of_two(2 ** 548 + 1)
False #(python code)
def is_power_of_two(n):
import math
if n <= 0:
return False
power = round(math.log(n, 2))
return 2 ** power == n