[racket-dev] expected timing difference between fft-complex-forward and fft-complex-radix2-forward?

From: Doug Williams (m.douglas.williams at gmail.com)
Date: Tue Oct 19 21:30:32 EDT 2010

John,

Attached is the latest FFT code that I have. Vincent also has a typed Racket
version of the code that he used to test the typed optimization that may be
safer and outperform this code.

Doug

On Tue, Oct 19, 2010 at 12:18 PM, Doug Williams <
m.douglas.williams at gmail.com> wrote:

> Yes it has. The main thing is that it has accelerators for 6 and 7 as
> factors - the old accelerators stopped at 5. 8192 doesn't have either of
> those factors (since it is a power of 2). But, there may have been bug fixes
> that I don't remember. I will zip up the latest code and send them to you
> this afternoon.
>
>
> On Tue, Oct 19, 2010 at 9:15 AM, John Clements <clements at brinckerhoff.org>wrote:
>
>>
>> On Oct 19, 2010, at 5:17 AM, Doug Williams wrote:
>>
>> > On my laptop:
>> >
>> > #lang racket
>> >
>> > (require "fft.rkt")
>> >
>> > (define v (build-vector 16384 (lambda (i) (random))))
>> >
>> > (define v1 (vector-copy v))
>> >
>> > (collect-garbage)
>> > (collect-garbage)
>> > (collect-garbage)
>> > (time (fft-complex-radix2-forward v1))
>> >
>> > (define v2 (vector-copy v))
>> >
>> > (collect-garbage)
>> > (collect-garbage)
>> > (collect-garbage)
>> > (time (fft-complex-forward v2))
>> >
>> > (for/and ([i (in-range (vector-length v))])
>> >  (< (magnitude (- (vector-ref v1 i) (vector-ref v2 i))) 1e-4))
>> >
>> > ==>
>> >
>> > cpu time: 94 real time: 94 gc time: 0
>> > cpu time: 79 real time: 78 gc time: 0
>> > #t
>> >
>> > I'll look at the rsound/fft implementation and see if I see the problem.
>>
>> It certainly sounds as though I broke it, or it changed after I got it.
>>  Has the source changed since you sent it to me last year?
>>
>> John
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20101019/6118d561/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fft.zip
Type: application/zip
Size: 20040 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20101019/6118d561/attachment.zip>

Posted on the dev mailing list.