Added optimization for Python 3 to use int.from_bytes instead of Python code