Thanks, the sum slipped in without me noticing. The array of random numbers are so that I don't have overhead for calling randn so many times.
On Sunday, 2 March 2014 14:57:35 UTC-5, Scott Parish wrote: > > > On Sun, Feb 16, 2014 at 12:00 PM, Andreas Noack Jensen < > [email protected] <javascript:>> wrote: > >> @time CallPrice.timecallprice(200) > > > By the way, if it wasn't immediately obvious in the above gist; the > original devectorized code had an unnecessary sum(C) call, as C is a > scalar. That unnecessary call was accounting for 90% of the garbage > created; the other 10% was the unnecessary array of random numbers. >
