So, my question is , why perl5 doesn't run over a virtual machine like JVM does?
Hysterical Raisins, erm historic reasons.
When Larry Wall started developing Perl, there weren't that many cross-platform virtual machines that were suitable for running Perl. I didn't do any computing back in those days, but my guess was there weren't actually any.
The current Perl 5 compiler (which includes its own VM, for that matter) is the result of gradual evolution from the original perl 1 sources, there was never a complete rewrite, so no good opportunity to switch to another VM.
There have been attempts to port Perl 5 to other VMs, but none of them have produced anything really compatible to perl 5. Given some idiosyncrasies in the parser, the runtime model and the XS API, that's not too surprising.
Finally you should consider that whenever you port something to a more general backend, you have to compensate for some mismatch between desired and available semantics, and implement missing parts. That comes with a performance cost you need to pay.
In reply to Re: why is there no a PVM for perl?
by moritz
in thread why is there no a PVM for perl?
by xiaoyafeng
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |