Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Perl is a compiler cum interpreter?

by diotalevi (Canon)
on Feb 15, 2007 at 17:21 UTC ( [id://600251]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Perl is a compiler cum interpreter?
in thread Perl is a compiler cum interpreter?

As I said above, the compiled form is a bunch of C structs in memory with pointers to each other. You could just dump this directly to disk but then it'd only be meaningful on a perl compiled exactly the same way. To get something you could run on someone else's perl you'd need to normalize it too. People tried doing that with the B::Bytecode module but it turned out that it was faster to go from source to optrees than "bytecode" to optrees.

So it's true that we could substitute parsing source for reconstituting optrees but parsing source is already so fast that there it isn't a win to "skip" it. If you want to try this out on your perl, write the results of perl -MO=Bytecode your-file.pl to disk and then check out the byteloader program. This has been removed in the latest dev versions of perl mostly because in addition to never actually being faster, it also never really worked.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-18 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found