Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

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

You do realize that there exists a project which acts like a JIT for compiled code right?

It exists because a JIT has more information available to than the compiler, it can do a better job at optimization.

The way Raku does it is even better than that because the JIT can actually sort-of ask the compiler what it really wants. Or rather the compiler gives the JIT enough hints ahead of time.


The reason I actually gave a timescale, instead of just saying “future”, is because of the RakuAST project which will end up cleaning a lot of semantic mismatches in the process. It should also make a lot of optimizations easier to perform.

The plan I believe is for Rakudo to switch to it within a year. Which allows 4 to 9 years for optimizations. Again those optimizations should be easier than the ones that already made Raku faster in some cases.
(By faster I mean faster than Perl and C/C++ for some cases.)

MoarVM is also getting a new dispatcher that should also be easier to add optimizations to. I don't recall seeing a timescale on that though.
(At least some of those optimizations will probably happen before it gets completely switched to.)

So two of the slowest parts are getting replaced with much more optimizable designs.


An optimization is just a way to push the implementation of a language as far as possible from the semantics of that language without it being noticed.
So you were sort-of right, the semantic mismatch between a language and its implementation is really really important to performance, only you had the argument backwards.

Of course you want as little semantic mismatches that doesn't allow for optimizations, because that is still code.

Rakudo is made of layers where each layer only has a slight semantic mismatch from its next higher or lower neighbor.
This allows for much larger shifts of semantics at the lowest layer without it being noticed at the top layer.

With perl there is pretty much exactly one layer, and it is the top layer. Which means you can't really change it all that much without changing semantics and thus breaking existing code. So there is a vast sea of optimizations that are just not possible.

Also I would really like to know how allowing you to change what is considered whitespace as a semantic mismatch. Because it really isn't.


The semantic mismatch between what is in my head and Raku is less than the mismatch with Perl.

That is the most important mismatch to reduce, because it is the only one that can't be optimized away.


In reply to Re^14: Modernizing the Postmodern Language? by b2gills
in thread Modernizing the Postmodern Language? by WaywardCode

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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 pondering the Monastery: (3)
    As of 2020-10-23 00:47 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      My favourite web site is:












      Results (234 votes). Check out past polls.

      Notices?