Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

For example, every Perl 5 op has to check if its operands are tied or have other magic attached. That's at least one if clause in every op (but I repeat myself).

Compiling Perl 5 with clang won't help that at all because the types of the operands aren't known until you run a Perl 5 program.

If, instead, the internals had separate types of variables depending on the attached magic such that the code to get a value from a tied scalar were a part of the tied scalar and not in every op, a lot of code could go away. A lot of conditionals could go away, especially for the common case where most scalars aren't tied scalars.

(Doing that in C like Parrot does doesn't really help much, because even a good optimizing C compiler can't optimize the trailer park polymorphic dispatch you have to write by hand to get something remotely like an object system in C. Chip had the right idea with Topaz, except that cross-platform C++ was awfully hard to support then.)

You can speed up op dispatch all you want, but the slow part of Perl 5 is the part that manages data.


In reply to Re^6: Perl 5 Optimizing Compiler, Part 7: Video Chat w/ Ingy & Reini, Today 9/18 8pm Central Time by chromatic
in thread Perl 5 Optimizing Compiler, Part 7: Video Chat w/ Ingy & Reini, Today 9/18 8pm Central Time by Will_the_Chill

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (11)
    As of 2014-08-28 23:44 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (275 votes), past polls