From: Chad Perrin Date: 2006-07-27T10:22:39+09:00 Subject: Re: For performance, write it in C On Thu, Jul 27, 2006 at 09:14:49AM +0900, Thomas E Enebo wrote: > On Thu, 27 Jul 2006, Chad Perrin defenestrated me: > > > > There is no intermediate bytecode step for Perl, as far as I'm aware. > > It's not a question I've directly asked one of the Perl internals > > maintainers, but everything I know about the Perl compiler confirms my > > belief that it simply does compilation to machine code. > > I have not been on the perl train for years, but I believe for Perl5 > at least this is not true. I remember Malcolm Beatties B module which > basically exposed the intermediate bytecodes that perl normally interprets. > That was some time ago and things may have changed? > > Here is some documentation on this (it could be old but it seems to > match my memory): > > http://www.faqs.org/docs/perl5int/c163.html > > So it looks like Perl is somewhat similiar to Java (perhaps the other > way around since Perl's interpreter pre-dates Java). An analogy of the > difference would be that Perl is CISC and Java is RISC since Perl bytecode > is higher level. Maybe they JIT pieces? I believe you are correct, with regard to an intermediate code step, after all. I've done some research on it to refresh my memory. Whether it continues to compile to a machine-readable executable or interprets the intermediate code form is something I haven't been able to nail down yet. I'll keep looking. Apparently, I was wrong somewhere along the way. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] "The measure on a man's real character is what he would do if he knew he would never be found out." - Thomas McCauley