java for math application

J

Jeremy Watts

hi,

i have been writing some mathematics programs in php to do mainly matrix
algebra, but find that they can be pretty slow for higher order matrices.

i've tried to improve the algorithms but still for some examples its taking
a good few seconds in some cases to return the result.

would you think that a move to java would improve the speed, as java is a
compilable language?

thanks
 
J

John

Jeremy said:
hi,

i have been writing some mathematics programs in php to do mainly matrix
algebra, but find that they can be pretty slow for higher order matrices.

i've tried to improve the algorithms but still for some examples its taking
a good few seconds in some cases to return the result.

would you think that a move to java would improve the speed, as java is a
compilable language?

thanks

It might do. If you are doing intensive array manipulation stuff in PHP,
java could give you a performance improvement. The most important factor
is not the language though, it's the algorithm.

If (for example) you are inverting big matrices with a recursive
approach like you do manually, you will find that performance is crap
regardless of the language.

I would use java for this purely because i would find it easier to
program and debug, and because of the supporting classes provided. I
would also be prepared to bet a pound to a pinch of rocking-horse shit
that someone has coded a nice matrix manipulation package already, which
you could get hold of.

John
 
T

The Abrasive Sponge

Jeremy said:
hi,

i have been writing some mathematics programs in php to do mainly matrix
algebra, but find that they can be pretty slow for higher order matrices.

i've tried to improve the algorithms but still for some examples its taking
a good few seconds in some cases to return the result.

would you think that a move to java would improve the speed, as java is a
compilable language?

thanks
might, plus there is some stuff already developed that you can run to
gauge the speed.


http://jakarta.apache.org/commons/math
http://jakarta.apache.org/commons/math/userguide/linear.html
 
M

Mark Thornton

John said:
I would use java for this purely because i would find it easier to
program and debug, and because of the supporting classes provided. I
would also be prepared to bet a pound to a pinch of rocking-horse shit
that someone has coded a nice matrix manipulation package already, which
you could get hold of.

http://dsd.lbl.gov/~hoschek/colt/

Free and fast.

Mark Thornton
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top