title: strange numpy fft performance
body: <p>During testing I have noticed something strange. </p>
  
  <p>I’m FFT’ing a lot of vectors, and from time to time the numpy FFT function seemed to crash. </p>
  
  <p>I briefly debugged this, and found that some vector lengths triggered the behavior. </p>
  
  <p>By incident, I kept  a script running, and to my surprise, it was not crashed, it simply took a little longer. </p>
  
  <p>Does anyone have an idea of what is going on, and how to counter act this.  I have seen this with many different FFT sizes, the below is an example only. </p>
  
  <pre><code>import numpy as np    
  import time
  
  a = np.zeros(166400)
  start = time.time()
  audio_fft = np.fft.fft(a,len(a))                          
  print "it took %fs"%(time.time() -start)
  
  a = np.zeros(165039)
  start = time.time()
  audio_fft = np.fft.fft(a,len(a))                          
  print "it took %fs"%(time.time() -start)
  
  a = np.zeros(165038)
  start = time.time()
  audio_fft = np.fft.fft(a,len(a))                          
  print "it took %fs"%(time.time() -start)
  
  a = np.zeros(165036)
  start = time.time()
  audio_fft = np.fft.fft(a,len(a))                          
  print "it took %fs"%(time.time() -start)
  
  a = np.zeros(165035)
  start = time.time()
  audio_fft = np.fft.fft(a,len(a))                          
  print "it took %fs"%(time.time() -start)
  
  a = np.zeros(165034)
  start = time.time()
  audio_fft = np.fft.fft(a,len(a))                          
  print "it took %fs"%(time.time() -start)
  
  a = np.zeros(165037)
  start = time.time()
  audio_fft = np.fft.fft(a,len(a))                          
  print "it took %fs"%(time.time() -start)
  
  print "done"
  </code></pre>
  
  <p>This outputs :</p>
  
  <pre><code>c:\Users\sol_sf\Desktop\math&gt;fftTest.py
  it took 0.029000s
  it took 0.101000s
  it took 0.176000s
  it took 0.220000s
  it took 0.671000s
  it took 0.065000s
  it took 369.132000s
  done
  
  c:\Users\sol_sf\Desktop\math&gt;
  </code></pre>