Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
A factor 3 isn't really that much of a difference, considering that with both languages you can/must switch to C/C++ for CPU-heavy work, which will fairly easily give you a factor 20 .. 100 speed increase, depending on the problem.

update: I might as well throw my opinion on Perl vs Ruby in here.

Ruby is slower than Perl, but neither should be used if pure raw speed is your ultimate goal.

Ruby has some nice idioms in the core library that are open for anyone to use and extend. Ruby's iterator/collection idioms are particularly nice compared to perl's mess of for(each) / while ... keys ... / whatever interface some CPAN module implements.

Perl has a larger range of modules in CPAN. Ruby modules are not organized in one place, so that means it's harder to find good quality extensions that do what you need.

Ruby's built-in OO interface is a LOT better than Perl's (which probably also explains why perl's standard collections suck so much).

Ruby has reasonably nice syntactic sugar for functional constructs. Perl has less of that, but it does offer a more consistent way of creating and passing functions.

Neither language has serious threading support - though Perl's ithreads are fairly easy to integrate with C/C++ pthreaded code.

Personally, if I wanted to create something large using a lot of OO that's not all that CPU critical, I'd probably go for Ruby over Perl, because Ruby looks better (especially OO code). If it also needs to be FAST, I don't know what I'd use - Common Lisp maybe, or Java, or C++, or possibly Clojure.


In reply to Re^3: Perl Vs Ruby by Joost
in thread Perl Vs Ruby by Dhanasekar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-28 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found