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

From: John Clements (clements at brinckerhoff.org)
Date: Tue Oct 19 11:15:48 EDT 2010

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 --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4669 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20101019/12c327d4/attachment.p7s>

Posted on the dev mailing list.