Re: execution times of MATLAB/LAPACK programs
- From: andy2O@xxxxxxxxxxx
- Date: 14 Jun 2005 06:20:56 -0700
Jeremy Watts wrote:
> Andy,
>
> Thanks for the reply, most informative. Looking at your results I'd say
> Octave whips Java, although I am fairly unsurprised by this.
>
Jeremy,
I'm glad my reply helped.
> My results for a 30 x 30 LU decomp. using Java is 1219ms, which is just over
> 1.2s, so quite a difference there. The method I am using is Doolittles by
> the way - dont know how MATLAB does it though.
>
> For the eigenvalues, its giving nearly 2seconds, again quite a difference.
>
> I guess a lot of it is that Java isnt a fully compiled language, unlike
> fortran, but it compiles to Java byte code.
>
Although I'd expect the fact that Java isn't fully compiled to make
some difference, I think modern JIT Java compilers, and gcc's Java
implementation can perform really quite fast. I think the main
difference is infact due to the issue you describe in your PS:
> PS the other thing is that I am using 'arbitrary length' arithmetic , which
> technically I dont need to use, switching to standard arithmetic would save
> a lot of time I'd say
I'm not a Java expert, but I think that arbitrary length arithmetic
implemented using software libraries and not the CPU's floating point
hardware instructions is **really** going to cost you a lot of time...
of course, whether of not you worry about run-time efficiency depends
on your application.
Of course, being able to solve an eigenvalue problem to arbitrary
precision is impressive in itself, v. useful if that is what you need,
and is a completely different capability to LAPACK or Matlab's
functionality.
But if all you need is double precision floating point precision, then
switching to hardware floating point will probably make a huge
difference to your runtimes....
Best wishes,
andy
PS: You know there is an initial release of a Java version of LAPACK
around?... and also the JAMA library, which has input from the Matlab
company The Mathworks.... See:
http://math.nist.gov/javanumerics/jama/
(Disclaimer: Seek advice from a Java wizard before you rip apart a code
in favour of usual floating point maths though, in case I'm wrong!! I
don't want to waste your time:-) )
.
- Follow-Ups:
- Re: execution times of MATLAB/LAPACK programs
- From: Jeremy Watts
- Re: execution times of MATLAB/LAPACK programs
- References:
- execution times of MATLAB/LAPACK programs
- From: Jeremy Watts
- Re: execution times of MATLAB/LAPACK programs
- From: andy2O
- Re: execution times of MATLAB/LAPACK programs
- From: andy2O
- Re: execution times of MATLAB/LAPACK programs
- From: Jeremy Watts
- execution times of MATLAB/LAPACK programs
- Prev by Date: Re: execution times of MATLAB/LAPACK programs
- Next by Date: Re: execution times of MATLAB/LAPACK programs
- Previous by thread: Re: execution times of MATLAB/LAPACK programs
- Next by thread: Re: execution times of MATLAB/LAPACK programs
- Index(es):
Relevant Pages
|