Mercurial > repos > public > sbplib
changeset 68:f9a65e62c5e5
Added script for benchmarking a function.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 23 Nov 2015 13:51:31 +0100 |
parents | 446d67a49cd8 |
children | f87003695677 |
files | benchmark.m |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
diff -r 446d67a49cd8 -r f9a65e62c5e5 benchmark.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmark.m Mon Nov 23 13:51:31 2015 +0100 @@ -0,0 +1,12 @@ +function benchmark(func, N) + default_arg('N',100); + + tic + profile on + + for i = 1:N + func(); + end + + profile viewer +end \ No newline at end of file