title: How can I make my python code use more cpu?
body: <p>My PC is with AMD Ryzen 5 3600X, with 6 cores, no GPU. I'm running my trained deep learning model in my pc to predict, and it is slow. What make it even slower is the fact I found that it only use about 1/20 of the total CPU time. My code is like following:</p>
  <pre><code>from time import process_time,time
  for i in range(cnt):
      print(&quot;learner &quot;, i , &quot; : &quot;, process_time() - start, time()-start1)
      res.append(learn_opt[i].get_preds())
  </code></pre>
  <p>and result is</p>
  <pre><code>learner  0  :  0.140625 0.14303159713745117
  learner  1  :  1.328125 18.774247884750366
  learner  2  :  2.390625 37.759544372558594
  timeused: 3.484375 56.34675097465515 
  </code></pre>
  <p>How to make my program use more cpu? I tried psutil.nice(psutil.HIGH_PRIORITY_CLASS) but I didn't observe change.</p>
  <p>Thanks!</p>