I generally find that using a comprehension around @elapsed is pretty terse and clear – it also makes it easy to compose with reducers like min, max, median, and quantile, which is convenient for analysis.
On Wed, Mar 11, 2015 at 12:51 PM, Patrick Kofod Mogensen < [email protected]> wrote: > It is indeed, thank you. I was also told that @timeit might do something > along the lines of what I am doing. > > > > On Wednesday, March 11, 2015 at 5:07:24 PM UTC+1, Andreas Noack wrote: >> >> @elapsed is what you are looking for >> >> 2015-03-11 7:43 GMT-04:00 Patrick Kofod Mogensen <[email protected]>: >> >>> I am testing the run times of two different algorithms, solving the same >>> problem. I know there is the @time macro, but I cannot seem to wrap my head >>> around how I should save the printed times. Any clever way of doing this? I >>> thought I would be able to >>> >>> [@time algo(input) for i = 1:500], >>> >>> but this saves the return form algo. >>> >>> >>> Best, >>> Patrick >>> >> >>
