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
> How fast is Ruby as compared to Perl/Python/Tcl/Java/VB/C++/C
>
> in its Arithmetic performance ?
>
> Any answers, comparative studies etc etc
see:
http://groups.google.com/groups?hl=en&q=alioth+shootout+ruby&qt_s=Search
Patrick
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
> 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?
--
Chris Game
"There is much pleasure to be gained in useless knowledge."
-- Bertrand Russell
pure ruby math is quite slow.
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:
http://raa.ruby-lang.org/cat.rhtml?category_major=Library;category_minor=Math
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^)