Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: How is a perl program processed ? (two kinds)

by tye (Sage)
on Apr 01, 2003 at 22:12 UTC ( [id://247368]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: How is a perl program processed ?
in thread How is a perl program processed ?

Note that a Perl regex is compiled into a tree of regnodes while the rest of the Perl code is compiled into a tree of opcodes.

So there are two different kinds of non-"byte-code"s here. The original inspiration of this thread was talking about regnodes while you've linked to a discussion about Perl opcodes.

The regnodes and opcodes are quite similar, so the impressions people have gotten from this minor misdirection are likely rather accurate. (:

I've heard that Perl is relatively slow at dispatching opcodes and relatively fast at dispatching regnodes such that formulating problems as a regex can be quite a bit faster than formulating them as Perl code. Not that this is usually an easy proposition.

                - tye
  • Comment on Re^3: How is a perl program processed ? (two kinds)

Replies are listed 'Best First'.
Re: Re^3: How is a perl program processed ? (two kinds)
by TheYoungMonk (Sexton) on Apr 07, 2003 at 11:49 UTC

    Great to see the topics diverting back to regex...i've been love with the beauty of regexes in perl. Wonder if there is any other language that has this capability of handling regex ?

    So why shud perl slow down while processing tree of opcodes if processing a tree of regnodes CAN be done faster ?

    If there is some optimized way of processing one kinda tree, cudnt it be applied to all nodetrees and make everything one step faster ?

    That cud make working with perl even more delightful!! I'm sure the monks cud throw some light in this angle i'm thinkin..

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (None)
    As of 2024-04-25 01:05 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found