Expokit.jl icon indicating copy to clipboard operation
Expokit.jl copied to clipboard

Benchmarks

Open acroy opened this issue 7 years ago • 7 comments

As briefly discussed in #9 and #18 having benchmarks of a couple of "real world problems" would be nice. Some suitable examples are provided in this paper, among them the 3D quantum harmonic oscillator. Additionally, @mforets suggested to "use Hurwitz-stable matrices arising from control systems".

New benchmarks should go into the folder benchmarks/ and this issue can be used for discussions.

acroy avatar Nov 19 '17 19:11 acroy

Do you have any preferred data format? I have been using MAT.jl. There is also HDF5.jl.

mforets avatar Nov 23 '17 11:11 mforets

I'll try PkgBenchmark.jl. Do you have experience with it? It allows to define benchmark groups and benchmark between different branches.

mforets avatar Nov 23 '17 11:11 mforets

Under the hood MATLABs mat format also uses hdf5, so from that perspective it probably doesn’t matter. If we stick to Julia, we could also use JLD. For sparse matrices there is also HarwellRutherfordBoeing.jl, which should be able to read the matrices provided with EXPOKIT.

PkgBenchmark.jl sounds very nice - I haven’t tried it yet.

acroy avatar Nov 23 '17 13:11 acroy

See PR #28 for a benchmark script using PkgBenchmark. I used JLD to store the matrices as you suggested.

mforets avatar Jun 07 '18 14:06 mforets

As we disccused in #30, I'd be interested in having a common benchmark suite for the package ExpmV.jl, that uses a different algorithm. I'm not really an expert of matrix exponentiation and I don't know how their speed and accuracy depends on the features of the matrix, so it would be interesting to have a comprehensive suite, including real-life matrices from different fields.

I don't know what would be the best way to implement this (a new package? or a new repository?) so that both packages can take advantage of the benchmark suite.

matteoacrossi avatar Aug 09 '18 14:08 matteoacrossi

As a real world application, please consider the householder reflection 2.*v*v' - eye(N). Normally, one should use its low rank decomposition like

H(x) = 2 .* v*(v'*x) - x

which is a linear operator.

I really hope ExpmV can also support a general linear operator as the input too.

GiggleLiu avatar Aug 09 '18 16:08 GiggleLiu

@matteoacrossi I think a separate package would make sense - possibly starting from #28. Everyone interested could add their method(s), run the benchmark suite and push the results. We would have to find a way to visualize the results somehow, but that is a separate issue.

acroy avatar Aug 10 '18 18:08 acroy