<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div><span>I should also add that Frej Drejhammar's work on a tracing JIT emulator would enable cross-module inlining etc in a somewhat different context, so it will be quite interesting to see what comes from that. I've only seen a couple of conference presentations yet, looking forward to more.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span>Best,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px;
font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span>Thomas</span></div><div class="yahoo_quoted" style="display: block;"> <br> <br> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> On Friday, October 11, 2013 8:09 AM, Thomas Lindgren <thomasl_erlang@yahoo.com> wrote:<br> </font> </div> <blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"> <div class="y_msg_container"><div id="yiv2495535465"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
sans-serif; font-size: 12pt;"><div><span>Hi Olivier,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span><br clear="none"></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span>Regarding cross-module optimization and inlining, have a look at these:</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span><br clear="none"></span></div><div style="background-color:transparent;"><span>http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.21.4909<br clear="none"></span></div><div
style="background-color:transparent;">http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.2.6496<br clear="none"></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;"><br clear="none"></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;">Appendix A of the second paper made me realize how much work is going on inside mnesia. For one benchmark, that algorithm decided to inline <span style="font-size:12pt;">mnesia:dirty_write/2 </span><span style="background-color:transparent;">something like 10 levels deep through 8 modules, resulting in a 1000-line function. The whole
topic needs more work though.</span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;"><br clear="none"></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;"><span>Best,</span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;"><span>Thomas</span></div><div class="yiv2495535465yahoo_quoted" style="display: block;"> <br clear="none"> <br clear="none"> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue,
'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div class="yiv2495535465yqt7710962440" id="yiv2495535465yqt77340"><div dir="ltr"> <font size="2" face="Arial"> On Thursday, October 10, 2013 1:23 PM, Olivier BOUDEVILLE <olivier.boudeville@edf.fr> wrote:<br clear="none"> </font> </div> <blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;margin-top:5px;padding-left:5px;"> <div class="yiv2495535465y_msg_container"><div id="yiv2495535465"><div><font size="2" face="sans-serif">Indeed! Additionally, it is quite recent.
</font>
<br clear="none">
<br clear="none"><font size="2" face="sans-serif">It could be interesting to measure the
speed-up that can actually be obtained, possibly in various settings (native
or not, with the various compilers, etc.); maybe this could also allow
to have Erlang shine a bit more in some benchmarks!<br clear="none">
</font>
<br clear="none"><font size="2" face="sans-serif">Thanks for the pointer (will definitively
try it),</font>
<br clear="none"><font size="2" face="sans-serif"><br clear="none">
Olivier.<br clear="none">
---------------------------<br clear="none">
Olivier Boudeville<br clear="none">
<br clear="none">
EDF R&D : 1, avenue du Général de Gaulle, 92140 Clamart, France<br clear="none">
Département SINETICS, groupe ASICS (I2A), bureau B-226<br clear="none">
Office : +33 1 47 65 59 58 / Mobile : +33 6 16 83 37 22 / Fax : +33 1 47
65 27 13</font>
<br clear="none">
<br clear="none">
<br clear="none">
<table width="100%"><tbody><tr valign="top"><td colspan="1" rowspan="1" width="40%"><font size="1" face="sans-serif"><b>tony@rogvall.se</b> </font>
<div><font size="1" face="sans-serif">10/10/2013 12:34</font>
</div></td><td colspan="1" rowspan="1" width="59%">
<table width="100%"><tbody><tr valign="top"><td colspan="1" rowspan="1">
<div align="right"><font size="1" face="sans-serif">A</font></div>
</td><td colspan="1" rowspan="1"><font size="1" face="sans-serif">olivier.boudeville@edf.fr</font>
</td></tr><tr valign="top"><td colspan="1" rowspan="1">
<div align="right"><font size="1" face="sans-serif">cc</font></div>
</td><td colspan="1" rowspan="1"><font size="1" face="sans-serif">erlang-questions@erlang.org</font>
</td></tr><tr valign="top"><td colspan="1" rowspan="1">
<div align="right"><font size="1" face="sans-serif">Objet</font></div>
</td><td colspan="1" rowspan="1"><font size="1" face="sans-serif">Re: [erlang-questions] "Fat"
BEAMs?</font></td></tr></tbody></table>
<br clear="none">
<table><tbody><tr valign="top"><td colspan="1" rowspan="1">
</td><td colspan="1" rowspan="1"></td></tr></tbody></table>
<br clear="none"></td></tr></tbody></table>
<br clear="none">
<br clear="none">
<br clear="none"><font size="3">Maybe give </font><a rel="nofollow" shape="rect" target="_blank" href="https://github.com/tonyrog/inline"><font size="3" color="blue"><u>https://github.com/tonyrog/inline</u></font></a><font size="3">
a try?</font>
<br clear="none">
<br clear="none"><font size="3">/Tony</font>
<br clear="none">
<br clear="none"><font size="3">On 10 okt 2013, at 11:56, Olivier BOUDEVILLE <</font><a rel="nofollow" shape="rect" ymailto="mailto:olivier.boudeville@edf.fr" target="_blank" href="mailto:olivier.boudeville@edf.fr"><font size="3" color="blue"><u>olivier.boudeville@edf.fr</u></font></a><font size="3">>
wrote:</font>
<br clear="none">
<br clear="none"><font size="2" face="sans-serif">Hi,</font><font size="3"> <br clear="none">
</font><font size="2" face="sans-serif"><br clear="none">
Let's suppose that, thanks to a parse-transform, we fetched recursively
from other modules most if not all code explicitly callable from a given
module, so that the full code (ultimately calling only basic language constructs
and BIFs) ends up in a single (presumably big, unfolded, possibly inlined)
AST. </font><font size="3"><br clear="none">
</font><font size="2" face="sans-serif"><br clear="none">
Then, in the prospect of native compilation (HiPe, possibly others
like ErLLVM), I imagine that not only we should get rid of the overhead
of inter-module calls, but we would also give to the compiler the best
full view on which it could operate and generate the best code it could
manage?</font><font size="3"> <br clear="none">
</font><font size="2" face="sans-serif"><br clear="none">
Has this approach already been attempted? Would it have some potential
interest?</font><font size="3"> <br clear="none">
</font><font size="2" face="sans-serif"><br clear="none">
Thanks in advance for any hint,</font><font size="3"> </font><font size="2" face="sans-serif"><br clear="none">
Best regards,</font><font size="3"> </font><font size="2" face="sans-serif"><br clear="none">
<br clear="none">
Olivier.<br clear="none">
---------------------------<br clear="none">
Olivier Boudeville<br clear="none">
<br clear="none">
EDF R&D : 1, avenue du Général de Gaulle, 92140 Clamart, France<br clear="none">
Département SINETICS, groupe ASICS (I2A), bureau B-226<br clear="none">
Office : +33 1 47 65 59 58 / Mobile : +33 6 16 83 37 22 / Fax : +33 1 47
65 27 13</font>
<br clear="none">
<div><font size="3"><br clear="none">
Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis
à l'intention exclusive des destinataires et les informations qui y figurent
sont strictement confidentielles. Toute utilisation de ce Message non conforme
à sa destination, toute diffusion ou toute publication totale ou partielle,
est interdite sauf autorisation expresse.</font>
</div><div><font size="3">Si vous n'êtes pas le destinataire de ce Message, il vous
est interdit de le copier, de le faire suivre, de le divulguer ou d'en
utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci
de le supprimer de votre système, ainsi que toutes ses copies, et de n'en
garder aucune trace sur quelque support que ce soit. Nous vous remercions
également d'en avertir immédiatement l'expéditeur par retour du message.</font>
</div><div><font size="3">Il est impossible de garantir que les communications par
messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées
de toute erreur ou virus.<br clear="none">
____________________________________________________</font>
</div><div><font size="3">This message and any attachments (the 'Message') are intended
solely for the addressees. The information contained in this Message is
confidential. Any use of information contained in this Message not in accord
with its purpose, any dissemination or disclosure, either whole or partial,
is prohibited except formal approval.</font>
</div><div><font size="3">If you are not the addressee, you may not copy, forward,
disclose or use any part of it. If you have received this message in error,
please delete it and all copies from your system and notify the sender
immediately by return message.</font>
</div><div><font size="3">E-mail communication cannot be guaranteed to be timely
secure, error or virus-free.</font>
</div><div><font size="3">_______________________________________________<br clear="none">
erlang-questions mailing list</font><font size="3" color="blue"><u><br clear="none">
</u></font><a rel="nofollow" shape="rect" ymailto="mailto:erlang-questions@erlang.org" target="_blank" href="mailto:erlang-questions@erlang.org"><font size="3" color="blue"><u>erlang-questions@erlang.org</u></font></a><font size="3"><br clear="none">
</font><a rel="nofollow" shape="rect" target="_blank" href="http://erlang.org/mailman/listinfo/erlang-questions"><font size="3">http://erlang.org/mailman/listinfo/erlang-questions</font></a>
<br clear="none">
<br clear="none"><font size="1" color="#2f2f2f" face="Arial">"Installing applications
can lead to corruption over time. Applications gradually write over each
other's libraries, partial upgrades occur, user and system errors happen,
and minute changes may be unnoticeable and difficult to fix"</font>
</div><div class="yiv2495535465yqt1467140295" id="yiv2495535465yqtfd41442"><br clear="none">
<br clear="none">
<br clear="none">
<br clear="none"></div><div class="yiv2495535465yqt1467140295" id="yiv2495535465yqtfd15773">
<div><br clear="none">
Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.</div>
<div>Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.</div>
<div>Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.<br clear="none">
____________________________________________________</div>
<div>This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.</div>
<div>If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.</div>
<div>E-mail communication cannot be guaranteed to be timely secure, error or virus-free.</div></div></div></div><br clear="none"><div class="yiv2495535465yqt1467140295" id="yiv2495535465yqtfd95476">_______________________________________________<br clear="none">erlang-questions mailing list<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:erlang-questions@erlang.org" target="_blank" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br clear="none"></div><br clear="none"><br clear="none"></div> </blockquote></div> </div> </div> </div> </div></div></div><br><div class="yqt7710962440" id="yqt94158">_______________________________________________<br clear="none">erlang-questions mailing list<br clear="none"><a shape="rect"
ymailto="mailto:erlang-questions@erlang.org" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br clear="none"><a shape="rect" href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br clear="none"></div><br><br></div> </blockquote> </div> </div> </div> </div></body></html>