diff fft/test.html @ 19:26056e866c29

Add FFTW to comparison table
author Chris Cannam
date Tue, 06 Oct 2015 13:08:39 +0100
parents 9619d2da67c2
children
line wrap: on
line diff
--- a/fft/test.html	Mon Oct 05 15:51:10 2015 +0100
+++ b/fft/test.html	Tue Oct 06 13:08:39 2015 +0100
@@ -18,6 +18,8 @@
   <script src="cross/FFT.js"></script>
   <script src="kissfft/KissFFT.js"></script>
   <script src="kissfft/FFT.js"></script>
+  <script src="fftw/FFTW.js"></script>
+  <script src="fftw/FFT.js"></script>
   <script src="test.js"></script>
 
   </head>
@@ -43,44 +45,29 @@
       <td>Cross</td><td id="cross-result"></td><td id="cross-1"></td><td id="cross-2"></td><td id="cross-itr"></td>
     </tr><tr>
       <td>KissFFT</td><td id="kissfft-result"></td><td id="kissfft-1"></td><td id="kissfft-2"></td><td id="kissfft-itr"></td>
+    </tr><tr>
+      <td>FFTW</td><td id="fftw-result"></td><td id="fftw-1"></td><td id="fftw-2"></td><td id="fftw-itr"></td>
     </tr>
   </table>
 
   <h3>Notes</h3>
 
   <ul>
-    <li><b>Nayuki</b>: in-place single-precision complex-complex</li>
-    <li><b>Nayuki (obj)</b>: Nayuki with the sin/cos tables pre-calculated on object construction</li>
-    <li><b>Nockert</b>: double-precision real-complex</li>
+    <li><b>Nayuki</b>: in-place single-precision complex-complex. Around 7kb.</li>
+    <li><b>Nayuki (obj)</b>: Nayuki with the sin/cos tables pre-calculated on object construction. Around 4kb.</li>
+    <li><b>Nockert</b>: double-precision real-complex. Around 25kb.</li>
     <li><b>Dntj</b>: double-precision complex-complex. Forward
     transform is scaled and I've scaled it back again here, which may
-    introduce rounding error.</li>
+    introduce rounding error. Around 10kb.</li>
     <li><b>Cross</b>: double-precision real-complex in C, compiled
     with Emscripten. This is considered a slow implementation amongst
-    native code ones.</li>
+    native code ones. Around 60kb.</li>
     <li><b>KissFFT</b>: single-precision real-complex in C, compiled
-    with Emscripten. This should be faster than Cross. Despite its
-    name, it is the most sophisticated implementation here.</li>
+    with Emscripten. A reasonably sophisticated implementation. Around
+    70kb.</li>
+    <li><b>FFTW</b>: single-precision real-complex in C, compiled with
+    Emscripten. GPL licensed. Around 3Mb.</li>
   </ul>
   
-  <h3>Rationale</h3>
-
-  <p>If 2150 iterations of real-to-complex FFT of size 2048 takes less
-    than 10 seconds, then we may be able to make a high quality
-    real-time phase vocoder (just).</p>
-
-  <p>A phase-vocoder of course must use overlapped windowed FFT
-    (although you can choose the size, within limits), IFFT, and
-    cartesian-polar conversion to calculate the phase for the
-    instantaneous frequency.</p>
-
-  <p>A reasonable estimate of CPU cost for the whole thing is
-    somewhere around 10x the cost of simple non-overlapping short-time
-    forward Fourier transforms across the signal. </p>
-
-  <p>2150 iterations corresponds to 100 seconds of audio
-    non-overlapped at 44.1kHz, so if that takes less than 10 seconds,
-    then in theory we might be OK.</p>
-
 </body>