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

Re: About the opcodes of Perl

by sundialsvc4 (Abbot)
on Sep 02, 2011 at 14:38 UTC ( [id://923853]=note: print w/replies, xml ) Need Help??


in reply to About the opcodes of Perl

I know that, when I write interpreters, the opcodes are very often highly specific.   Especially, say, in the ops that handle loop-structures.   Although in a traditional compiler you might generate large numbers of very-simple opcodes (extremely so, in the case of RISC), a p-code interpreter (IMHO) favors fewer numbers of iterations through the main fetch-and-execute loop, thus complex opcodes.   There’s really no incremental cost in adding another one.

Perl, AFAIK, always compiles on-the-fly (as opposed to Python’s .pyc files, e.g.), so the concern of bytecode backwards-compatibility in existing p-code files is not a concern.   But for others, including some that I have written, it is.   When you find a better way to do things, you have to keep support for the old way so that older programs continue to run.   (In my case, I actually had to re-define the p-code record format ... oh well.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-19 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found