I used the optimization coach for the first time today. First, a suggestion. I wrestled with it for about five minutes before I realized that it applied only to programs written in TR. An error message here would be *really* useful; I kept mousing over and clicking and unclicking things to get the results of the coach to show up.
Second, I'm trying to see what difference inlining makes, using this program that basically just fills a vector with a sine wave. Turning on the coach for the program below suggests to me that either a) no inlining is occurring for the call to "supply" in the body of the loop, or b) the coach isn't displaying that information in a way I understand. Any hints? John #lang typed/racket (require racket/flonum) (define f (make-flvector (* 10 44100))) (define srinv (/ 1.0 44100.0)) (define k (* srinv 440.0 1/44100 2 pi)) (: supply (Integer Flonum -> Void)) (define (supply i t) (flvector-set! f i (sin (* k t)))) (time (for ([i (* 10 44100)]) (define i#i (exact->inexact i)) (supply i i#i)))
smime.p7s
Description: S/MIME cryptographic signature
_________________________ Racket Developers list: http://lists.racket-lang.org/dev