Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: Perl slower than java

by dHarry (Abbot)
on Dec 09, 2010 at 12:43 UTC ( [id://876244]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Perl slower than java
in thread Perl slower than java

performance-aware algorithm design

I fulle agree, however sometimes there is not a lot you can do. Or sometimes the cost is less important/irrelevant, only speed matters. To give an example, I'm working on over-constrained CSP's and the algorithms are al at least NPC. Speeds is very important. We will even settle for sub-optimal solutions if we can speed things up. This is exlactly the reason why I've been looking into genetic algorithms.

If you can improve the performance of a C-program by a factor 60 by rewriting it in Perl I would argue it was a poor implementation in C in the first place. I'm a big fan of Perl but I'm not religious when it comes to programming, when I need speed there are normally better options available.

Cheers

Harry

Replies are listed 'Best First'.
Re^4: Perl slower than java
by anonymized user 468275 (Curate) on Dec 09, 2010 at 14:32 UTC
    The problem wasn't that it was a bad implementation in C -- it just wasn't a system programming implementation in C with calls to system services everywhere. To take a very common example, a C system programmer will use system library calls to process a bunch of files by wildcard, whereas a C application programmer would probably use ksh for that part of the solution. A Perl programmer will also use system calls, but transparently :)

    One world, one people

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://876244]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2024-04-23 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found