Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Why is this code so much slower than the same algorithm in C?

by Erez (Curate)
on Dec 09, 2008 at 08:44 UTC ( #729105=note: print w/ replies, xml ) Need Help??


in reply to Re: Why is this code so much slower than the same algorithm in C?
in thread Why is this code so much slower than the same algorithm in C?

Perl is an interpreted language ... Perl code is executed by a virtual machine that is itself a binary executable for the native hardware of the host

No, and No.
Quote Tom Christiansen (FMTEYEWTK about Compilation vs Interpretation in Perl):

The perl executable ... has two distinct stages ... It compiles your perl program source into a parse tree. This compiler then performs various optimizations such as ... loading in certain library definitions ...
Next comes the backend, which is certainly an interpreter of sorts; let's call it a PP interpreter for now, just because. While what it actually executes is a parse tree and not byte code per se, still we would not go wrong in classifying this backend as a byte-code interpreter (like java or python). This is useful in particular when it comes to distinguishing these languages from "pure" interpreters.

"A core tenant of the greater Perl philosophy is to trust that the developer knows enough to solve the problem" - Jay Shirley, A case for Catalyst.


Comment on Re^2: Why is this code so much slower than the same algorithm in C?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2014-10-24 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (131 votes), past polls