Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Perl 6 and byte code
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Stéphane Payrard  
View profile  
 More options Oct 27 2004, 7:39 am
Newsgroups: perl.perl6.internals
From: s...@payrard.net (Stéphane Payrard)
Date: Wed, 27 Oct 2004 13:39:44 +0200
Local: Wed, Oct 27 2004 7:39 am
Subject: Re: Perl 6 and byte code

On Wed, Oct 27, 2004 at 12:00:33PM +0100, Peter Hickman wrote:
> Presently Python compiles it's py files to pyc files that can then be
> run without access to the source (the py).

> Would Perl 6 be able to do this? Compile the pl to plc and pm to pmc and
> load the ??c version if it was available and newer than the
> source?

I suppose that means implementing for perl6 the equivalent of
ccache. I doubt that, in general, the preferred form of a dynamic
programming language is the bytecode one.

> Other than code hiding would there be any performance benefits?

There is the age old debate about the dubious benefits of source
code hiding.

--
  stef


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Sugalski  
View profile  
 More options Oct 27 2004, 9:07 am
Newsgroups: perl.perl6.internals
From: d...@sidhe.org (Dan Sugalski)
Date: Wed, 27 Oct 2004 09:07:32 -0400
Local: Wed, Oct 27 2004 9:07 am
Subject: Re: Perl 6 and byte code
At 12:00 PM +0100 10/27/04, Peter Hickman wrote:

>Presently Python compiles it's py files to pyc files that can then
>be run without access to the source (the py).

>Would Perl 6 be able to do this? Compile the pl to plc and pm to pmc
>and load the ??c version if it was available and newer than the
>source?

Yeah, that's doable. Probably will be done.

>Other than code hiding would there be any performance benefits?

Given that the bytecode will probably have a segment with the
original source in it, this isn't likely to get you much of a win
there.

There should be a performance win, though. There won't be a need to
compile the source, which saves some time. Bytecode files on-disk are
shared across all the processes in the system, so you only get one
in-memory copy of a file, which saves both RAM and load time if
you're using a file that another process is using.

On single user or small machines this probably won't be a big win in
most cases. It should, however, make a pretty big difference in
server systems.
--
                                Dan

--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
d...@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Hickman  
View profile  
 More options Oct 27 2004, 9:19 am
Newsgroups: perl.perl6.internals
From: pe...@semantico.com (Peter Hickman)
Date: Wed, 27 Oct 2004 14:19:38 +0100
Local: Wed, Oct 27 2004 9:19 am
Subject: Re: Perl 6 and byte code

Thanks for that, I was pretty sure that it should have been doable.

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gisle Aas  
View profile  
 More options Oct 27 2004, 9:24 am
Newsgroups: perl.perl6.internals
From: gi...@activestate.com (Gisle Aas)
Date: 27 Oct 2004 06:24:51 -0700
Local: Wed, Oct 27 2004 9:24 am
Subject: Re: Perl 6 and byte code

Dan Sugalski <d...@sidhe.org> writes:
>                                             Bytecode files on-disk are
> shared across all the processes in the system, so you only get one
> in-memory copy of a file, which saves both RAM and load time if you're
> using a file that another process is using.

I assume this means that the plan is to mmap these files.  Are most
systems happy with hundreds (or thousands) of mapped sections of
memory or are there some negative performance implications of doing
that?

How about the code JITed from the bytecodes. Will it be shared?

Regards,
Gisle


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Sugalski  
View profile  
 More options Oct 27 2004, 9:57 am
Newsgroups: perl.perl6.internals
From: d...@sidhe.org (Dan Sugalski)
Date: Wed, 27 Oct 2004 09:57:01 -0400
Local: Wed, Oct 27 2004 9:57 am
Subject: Re: Perl 6 and byte code
At 6:24 AM -0700 10/27/04, Gisle Aas wrote:

>Dan Sugalski <d...@sidhe.org> writes:

>>                                              Bytecode files on-disk are
>>  shared across all the processes in the system, so you only get one
>>  in-memory copy of a file, which saves both RAM and load time if you're
>>  using a file that another process is using.

>I assume this means that the plan is to mmap these files.  Are most
>systems happy with hundreds (or thousands) of mapped sections of
>memory or are there some negative performance implications of doing
>that?

Most systems I know about are unhappy with hundreds or thousands of
mmaped segments per-process, but that's generally not a problem for
that many segments for the system as a whole. I think that mmap
shares underlying code paths with the code to map in shared libraries
most places, so we shouldn't have to worry about it. If things fail,
we can always fall back to an alternate plan.

>How about the code JITed from the bytecodes. Will it be shared?

Unfortunately not, no. It wouldn't be a bad idea to expand the
bytecode files to allow executable segments that could be used in
trusted situations.
--
                                Dan

--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
d...@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Clites  
View profile  
 More options Oct 27 2004, 12:56 pm
Newsgroups: perl.perl6.internals
From: jcli...@mac.com (Jeff Clites)
Date: Wed, 27 Oct 2004 09:56:54 -0700
Local: Wed, Oct 27 2004 12:56 pm
Subject: Re: Perl 6 and byte code
On Oct 27, 2004, at 6:24 AM, Gisle Aas wrote:

> How about the code JITed from the bytecodes. Will it be shared?

The JITed code can't be shared directly--in it's current form, it
(intentionally) includes absolute addresses which wouldn't be valid for
other processes.

But the exec core allows (or, will allow) bytecode to be compiled into
a native executable (or presumably, library), so that would allow the
advantages of native, memory-shared code.

JEff


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »