LoginSignup
13
7

More than 5 years have passed since last update.

PythonでCPUのコア数を出力

Posted at

Python3でも2でもCPUのコア数を出力するのは同様の流れです。
ただ、いつ使うのかと言われても、私自身よくわかりません…。

>>> import multiprocessing
>>> multiprocessing.cpu_count()
8

上記の例は、HTT搭載の4コアCPU(Intel Core i7-3740QM)で試した場合です。

13
7
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
7