Changes

Jump to: navigation, search

Kraken Info

800 bytes added, 01:43, 25 October 2010
audio-fft
== audio-fft ==
 
'''Description.'''
A ''kernel''. Computes a Fast Fourier Transform.
 
'''Key features.'''
A big chunk of run-time is in this loop:
 
while ( i < bufferSize ) {
off = i + halfSize;
tr = (currentPhaseShiftReal * real[off]) - (currentPhaseShiftImag * imag
[off]);
ti = (currentPhaseShiftReal * imag[off]) + (currentPhaseShiftImag * real
[off]);
 
real[off] = real[i] - tr;
imag[off] = imag[i] - ti;
real[i] += tr;
imag[i] += ti;
 
i += halfSize << 1;
}
 
Array gets and sets dominate.
 
'''Mozilla-specific things.'''
In the above loop, 'i' and 'off' are loaded as doubles and have to be converted to integers using a combination of inline code and calls to js_DoubleToInt32(). This should be avoided ([https://bugzilla.mozilla.org/show_bug.cgi?id=606879 bug 606879]).
== audio-oscillator ==
Confirm
1,345
edits

Navigation menu