

'''simple docstring'''






from timeit import timeit


def 		_A     (    A__      ):






 """simple docstring"""



 if number < 0:
  raise ValueError('''the value of input must not be negative'''      )
 __lowercase							  = 0
 while number:
  number &= number - 1
  result += 1
 return result


def 		_A     (    A__      ):






 """simple docstring"""



 if number < 0:
  raise ValueError('''the value of input must not be negative'''      )
 __lowercase							  = 0
 while number:
  if number % 2 == 1:
   result += 1
  number >>= 1
 return result


def 		_A     (    ):






 """simple docstring"""



 def do_benchmark(A__      ) -> None:
  __lowercase							  = '''import __main__ as z'''
  print(F"Benchmark when {number = }:"      )
  print(F"{get_set_bits_count_using_modulo_operator(A__      ) = }"      )
  __lowercase							  = timeit('''z.get_set_bits_count_using_modulo_operator(25)'''     ,				setup=A__      )
  print(F"timeit() runs in {timing} seconds"      )
  print(F"{get_set_bits_count_using_brian_kernighans_algorithm(A__      ) = }"      )
  __lowercase							  = timeit(
      '''z.get_set_bits_count_using_brian_kernighans_algorithm(25)'''     ,				setup=A__     ,				)
  print(F"timeit() runs in {timing} seconds"      )

 for number in (25, 37, 58, 0):
  do_benchmark(A__      )
  print()


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 benchmark()




'''simple docstring'''






from typing import TYPE_CHECKING

from ...file_utils import _LazyModule, is_torch_available
from ...utils import OptionalDependencyNotAvailable


lowerCAmelCase__											=	{
    '''configuration_gpt_neox_japanese''': ['''GPT_NEOX_JAPANESE_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''GPTNeoXJapaneseConfig'''],
    '''tokenization_gpt_neox_japanese''': ['''GPTNeoXJapaneseTokenizer'''],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase__											=	[
     '''GPT_NEOX_JAPANESE_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''GPTNeoXJapaneseForCausalLM''',
     '''GPTNeoXJapaneseLayer''',
     '''GPTNeoXJapaneseModel''',
     '''GPTNeoXJapanesePreTrainedModel''',
 ]


if TYPE_CHECKING:
 from .configuration_gpt_neox_japanese import GPT_NEOX_JAPANESE_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTNeoXJapaneseConfig
 from .tokenization_gpt_neox_japanese import GPTNeoXJapaneseTokenizer

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_gpt_neox_japanese import (
      GPT_NEOX_JAPANESE_PRETRAINED_MODEL_ARCHIVE_LIST,
      GPTNeoXJapaneseForCausalLM,
      GPTNeoXJapaneseLayer,
      GPTNeoXJapaneseModel,
      GPTNeoXJapanesePreTrainedModel,
  )


else:
 import sys

 lowerCAmelCase__											=	_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)

