I tried this, it runs in about the same amount of time as it did for you. On Sat, Jul 17, 2010 at 7:17 PM, Carson <[email protected]> wrote:
> Hi David, > Would appreciate if you could try out my attempt at this [1] on your > machine. My machine ain't as fast as yours apparently... > > [1] > > https://groups.google.com/group/clojure/tree/browse_frm/thread/ee4169bc292ab572/6d03461efde166ad?rnum=11&_done=%2Fgroup%2Fclojure%2Fbrowse_frm%2Fthread%2Fee4169bc292ab572%2Ff769ca6eb6fb8622%3Ftvc%3D1%26#doc_6d03461efde166ad > > Thanks, > Carson > > On Jul 17, 4:04 pm, David Nolen <[email protected]> wrote: > > (defn ^{:static true} convolve ^doubles [^doubles xs ^doubles is] > > (let [xlen (count xs) > > ilen (count is) > > ys (double-array (dec (+ xlen ilen)))] > > (dotimes [p xlen] > > (dotimes [q ilen] > > (let [n (+ p q), x (aget xs p), i (aget is q), y (aget ys n)] > > (aset ys n (+ (* x i) y))))) > > ys)) > > > > I don't think this is so bad and it can do a million points in ~400ms on > my > > machine. 100,000 points in ~25ms. I don't consider this dropping to the > Java > > level at all. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > [email protected]<clojure%[email protected]> > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
