Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

1 view
Skip to first unread message

vsap...@gmail.com

unread,
Aug 26, 2005, 4:17:11 PM8/26/05
to
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

Patrick Gundlach

unread,
Aug 26, 2005, 4:29:29 PM8/26/05
to
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

see:

http://groups.google.com/groups?hl=en&q=alioth+shootout+ruby&qt_s=Search

Patrick

Phil Tomson

unread,
Aug 26, 2005, 5:32:45 PM8/26/05
to
In article <1125087431.6...@g14g2000cwa.googlegroups.com>,

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

Chris Game

unread,
Aug 27, 2005, 8:16:41 AM8/27/05
to
Phil Tomson wrote:

> 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

gabriele renzi

unread,
Aug 27, 2005, 8:55:24 AM8/27/05
to
vsap...@gmail.com ha scritto:

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

James Kim

unread,
Aug 28, 2005, 9:54:29 AM8/28/05
to
gabriele renzi wrote:
> 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^)

0 new messages