At 12:53 PM 9/10/2001 +0100, Nicholas Clark wrote:
>On Sun, Sep 09, 2001 at 10:16:27PM +0100, Simon Cozens wrote:
> > =head1 Elements of the C<STRING> structure
> >
> > Those implementing the C<STRING> API will obviously need to know about
> > how the C<STRING> structure works. You can find the definition of this
> > structure in F<string.h>:
> >
> >     struct parrot_string {
> >       void *bufstart;
> >       IV buflen;
> >       IV bufused;
> >       IV flags;
> >       IV strlen;
> >       IV encoding;
> >       IV type;
> >       IV unused;
> >     };
>
>At some point on p5p Ilya Zakharevich expressed regret that perl5 doesn't
>support split buffers. A split buffer would allow things like regular
>expressions to run faster when repeatedly substituting in the middle of a
>string, as it reduces the amount of data to copy. With a single contiguous
>buffer

As Simon's said, the buffer can certainly be pointing to a fancier data 
structure than "heap 'o bytes". :) I hadn't considered that, though. I was 
thinking that split strings would be dealt with at a higher-level of 
abstraction--in the PMC (basically at the variable level) rather than in 
the string itself.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to