Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Well, what's compilation for you? Any good interpreted language make a parse of the code, create a bytecode, optimize it, and than run the code. You can see that for Perl, Phyton, Java (yes a .class is just a bytecode), etc...

When the bytecode is created the code is optimized, numbers will be calculated (like 1024*8 to 8192), quoted strings will be parsed, etc... And this is very important to can run nice and easy the code.

About the regex. Well, why parse and create for each regex? In the bytecode stage all the regex are parsed and created, and similar regex will use the same compiled regex. Note that regex is not a simple thing to do, and anything that can get speed is welcome!

I think that the best way to differ real compiled programs to interpreted, is the creation of binarys codes or not. A real binary code will have machine codes, that will be executed by the OS to work with the CPU instructions.

The definition of compilation can't tell you if is a interpreted program:
Compile: To put together, to construct, to build... To put together in a new form...

Just to remember some assembler. This code in C, when is compiled, is converted to Assembler fisrt:

## C: a = b + c + d ; ## Assembler: ADD a , b , c ADD a , a , d
The ADD is a CPU instruction (based on MIPS). But in the end everything is interpreted, if you think that CPU instructions are a language. ;-P

About Perl supposed to be doing interpretation. Well, Perl don't follow any theorie/philosophy/concept just by the theorie/philosophy/concept. This is why the Perl interpreter is the faster and with the best memory management that exist.

The famous phrase:
"Perl is designed to make the easy jobs easy and the hard jobs possible."
-Larry Wall

Graciliano M. P.
"The creativity is the expression of the liberty".


In reply to Re: How is a perl program processed ? by gmpassos
in thread How is a perl program processed ? by TheYoungMonk

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 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? | Other CB clients
Other Users?
Others about the Monastery: (1)
As of 2022-10-01 10:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (126 votes). Check out past polls.

    Notices?