view fft/index.html @ 32:ebc87a62321d

Add Nayuki fft.c compiled to JS
author Chris Cannam
date Mon, 09 Nov 2015 11:46:47 +0000
parents 9af60df83c6f
children c795fab4c4be
line wrap: on
line source
<html>
  <head>

    <meta charset="UTF-8">
    <title>Javascript FFT speed test</title>

    <style type="text/css">
      body { margin: 5%; }
      table, td, th { border: 0.1em solid #e0e0e0; border-collapse: collapse }
      td, th { padding: 0.5em }
    </style>
    
    <script src="nayuki/fft.js"></script>
    <script src="nayuki-obj/fft.js"></script>
    <script src="nayukic/NayukiCFFT.js"></script>
    <script src="nayukic/FFT.js"></script>
    <script src="fft.js/lib/complex.js"></script>
    <script src="jsfft/lib/complex_array.js"></script>
    <script src="jsfft/lib/fft.js"></script>
    <script src="cross/Cross.js"></script>
    <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>
<body>

  <h3>Forward real-complex FFT speed test</h3>

  <p id="test-description"></p>
  
  <table>
    <tr>
      <th>Implementation</th><th>Result</th><th>Time (first half)</th><th>Time (second half)</th><th>Rate (second half)</th>
    </tr>
    <tr>
      <td>Nayuki</td><td id="nayuki-result"></td><td id="nayuki-1"></td><td id="nayuki-2"></td><td id="nayuki-itr"></td>
    </tr><tr> 
      <td>Nayuki (obj)</td><td id="nayukiobj-result"></td><td id="nayukiobj-1"></td><td id="nayukiobj-2"></td><td id="nayukiobj-itr"></td>
    </tr><tr> 
      <td>Nayuki (C)</td><td id="nayukic-result"></td><td id="nayukic-1"></td><td id="nayukic-2"></td><td id="nayukic-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>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>FFTW</td><td id="fftw-result"></td><td id="fftw-1"></td><td id="fftw-2"></td><td id="fftw-itr"></td>
    </tr><tr> 
      <td>Nockert</td><td id="nockert-result"></td><td id="nockert-1"></td><td id="nockert-2"></td><td id="nockert-itr"></td>
    </tr><tr>
      <td>Dntj</td><td id="dntj-result"></td><td id="dntj-1"></td><td id="dntj-2"></td><td id="dntj-itr"></td>
    </tr>
  </table>

  <h3>Notes</h3>

  <ul>
    <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>Nayuki (C)</b>: Nayuki C implementation compiled with Emscripten. Does not have pre-calculated sin/cos tables.</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. 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. Around 60kb.</li>
    <li><b>KissFFT</b>: single-precision real-complex in C, compiled
    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>
  
</body>