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

Discussion in 'Ruby' started by vsapre80@gmail.com, Aug 26, 2005.

  1. Guest

    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
    , Aug 26, 2005
    #1
    1. Advertising

  2. Patrick Gundlach, Aug 26, 2005
    #2
    1. Advertising

  3. Phil Tomson Guest

    In article <>,
    <> 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
    Phil Tomson, Aug 26, 2005
    #3
  4. Chris Game Guest

    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
    Chris Game, Aug 27, 2005
    #4
  5. 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?category_major=Library;category_minor=Math
    gabriele renzi, Aug 27, 2005
    #5
  6. James Kim Guest

    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^)
    James Kim, Aug 28, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michele Simionato

    Python is darn fast (was: How fast is Python)

    Michele Simionato, Aug 23, 2003, in forum: Python
    Replies:
    13
    Views:
    552
  2. joshc
    Replies:
    5
    Views:
    544
    Keith Thompson
    Mar 31, 2005
  3. Mumia W.

    Inline::Tcl vs. Inline::Tcl

    Mumia W., Aug 23, 2006, in forum: Perl Misc
    Replies:
    0
    Views:
    131
    Mumia W.
    Aug 23, 2006
  4. PerlFAQ Server
    Replies:
    0
    Views:
    120
    PerlFAQ Server
    Apr 8, 2011
  5. Anil A Kumar
    Replies:
    2
    Views:
    122
    J├╝rgen Exner
    Aug 3, 2011
Loading...

Share This Page