At 09:12 PM 8/1/00 -0400, Bryan C. Warnock wrote:
>On Tue, 01 Aug 2000, Matthew Cline wrote:
>
> > Doesn't tying slow things down?  If you did compile time type
> > checking, this would take no perfromance hit.  Also you could, say,
> > add some opcodes for doing runtime checking, so that runtime
> > checking would be faster than doing it with tying, but wouldn't bog
> > SVs down with having to carry around too much more extra info.
> > (At least, this is the impression I get from my limmited knowledge
> > of Perl internals).
>
>Except perl, because it is perl, and does perlish things, always needs
>to do runtime checking.  Removing automatic runtime checking in favor
>of an op indicating runtime checking will double the size of the optree,
>and make regular perl that much slower with everything else.

I doubt it'd double the size, especially if it was smart and only inserted 
check opcodes where it wasn't sure they weren't needed.

However, a vtable setup for scalars (now that I've got a handle on that) 
would reduce the cost significantly. In that case the scalar (or hash, or 
array, or whatever) itself would be responsible for typechecking, so the 
ops could just willy-nilly assign things and let the variables fend for 
themseles.

                                        Dan

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

Reply via email to