Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > How Fast is Ruby cpr. Perl, Python, Tcl , C++, Java - Arithmetic

Reply
Thread Tools

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

 
 
vsapre80@gmail.com
Guest
Posts: n/a
 
      08-26-2005
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

 
Reply With Quote
 
 
 
 
Patrick Gundlach
Guest
Posts: n/a
 
      08-26-2005
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=e...by&qt_s=Search

Patrick
 
Reply With Quote
 
 
 
 
Phil Tomson
Guest
Posts: n/a
 
      08-26-2005
In article <(E-Mail Removed) .com>,
<(E-Mail Removed)> wrote:
>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
 
Reply With Quote
 
Chris Game
Guest
Posts: n/a
 
      08-27-2005
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
 
Reply With Quote
 
gabriele renzi
Guest
Posts: n/a
 
      08-27-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) ha scritto:
> 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


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?c...ory_minor=Math
 
Reply With Quote
 
James Kim
Guest
Posts: n/a
 
      08-28-2005
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^)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to build a loadable tcl dll with visual studio (microsoft C compiler)?[crosspost in comp.lang.tcl and comp.lang.c++] Michael Reichenbach C++ 5 02-08-2010 02:38 PM
Fast decimal arithmetic module released Mark Dickinson Python 3 10-03-2009 12:04 PM
Inline::Tcl vs. Inline::Tcl Mumia W. Perl Misc 0 08-23-2006 04:09 PM
Usual Arithmetic Conversions-arithmetic expressions joshc C Programming 5 03-31-2005 02:23 AM



Advertisments