Mercurial > repos > public > sbplib_julia
comparison benchmarks/laplace_benchmark.m @ 876:4f3924293894 laplace_benchmarks
Add examples and benchmarks folders
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 27 Jan 2022 11:00:31 +0100 |
parents | laplace_benchmark.m@9929c99754fb |
children |
comparison
equal
deleted
inserted
replaced
875:067a322e4f73 | 876:4f3924293894 |
---|---|
1 m = 4001; | |
2 ops = sbp.D2Standard(m,{0,1},4); | |
3 D2 = ops.D2; | |
4 u = linspace(0,1,m)'; | |
5 f = zeros(size(u)); | |
6 | |
7 nsample = 10000; | |
8 ts = zeros(nsample,1); | |
9 | |
10 for i = 1:nsample | |
11 tic; f = D2*u; t = toc; | |
12 ts(i) = t; | |
13 end | |
14 min(ts) |