At 02:45 PM 8/5/00 +0000, Nick Ing-Simmons wrote:
>We currently (perl5) have the "token" being:
>
>struct sv {
>     void*       sv_any;         /* pointer to something */
>     U32         sv_refcnt;      /* how many references to us */
>     U32         sv_flags;       /* what we are */
>};
>
>3 words (which is a "funny" number in a binary world.

Three is an interesting number....

>(With the type hiding in flags as a small int.)
>
>Current perl6 "token" proposed by RFC 35 is:
>
>5 words (which is if anything a slighty worse number...)

For a number of fnord reasons, five is a better number. :)

>I think I would make it 4 or 8 words:
>So my own favourite right now allows a little more - to keep data and token
>together for cache, and to avoid extra malloc() in simple cases.
>Some variant like:
>
>     struct {
>       vtable_t *vtable;           // _new_ - explcit type
>       IV flags;                   // sv_flags
>       void *sync_data;            // _new_ - for threads etc.
>       IV GC_data;                 // REFCNT
>       void *ptr;                  // SvPV, SvRV
>       IV   iv;                    // SvIV, SvCUR/SvOFF
>       NV   nv;                    // SvNV
>     }

Sold, to the man talking sense! I'll update the RFC with this. (I really 
should read all my mail before responding...)

                                        Dan

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

Reply via email to