How Fast is Ruby cpr. Perl, Python, Tcl , C++, Java - Arithmetic

V

vsapre80

Hi,

How fast is Ruby as compared to Perl/Python/Tcl/Java/VB/C++/C

in its Arithmetic performance ?

Any answers, comparative studies etc etc


Vishal
 
P

Phil Tomson

Hi,

How fast is Ruby as compared to Perl/Python/Tcl/Java/VB/C++/C

in its Arithmetic performance ?

Any answers, comparative studies etc etc

Certainly Ruby will be much slower than C/C++ for arithmetic. Probably
quite a bit slower than Java now too.

However, it's quite easy to extend Ruby with C and implement certain time
consuming arithmetic intensive functions in C and call them from Ruby
(I've done this and generally speaking it speeds things up quite nicely).

Phil
 
C

Chris Game

Phil said:
Certainly Ruby will be much slower than C/C++ for arithmetic.
Probably quite a bit slower than Java now too.

However, it's quite easy to extend Ruby with C and implement
certain time consuming arithmetic intensive functions in C and
call them from Ruby (I've done this and generally speaking it
speeds things up quite nicely).

How can you carry over the seamless handling of large integers into
C though?
 
G

gabriele renzi

J

James Kim

gabriele said:
Luckily, there are quite a bit of modules to allow you to do
fast math: look for Narray, ruby/GSL, ruby/Rmath etc.. or simply
navigate the "math" directory in raa:

Which one, however, is most appropriate among Ruby tools if I want to
use instead of MATLAB, i.e, for linear algebra mathematics? For example,
in Python, there is *NumPy* that is one of the most popular tools for
mathematical processing in Python.

*Numpy represents Numerical Python.

-James (^o^)
 

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

Staff online

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top