<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Jul 8, 2018 at 9:47 PM, Thorsten Engler <span dir="ltr"><<a href="mailto:thorsten.engler@gmx.net" target="_blank">thorsten.engler@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-AU" link="blue" vlink="purple"><div class="m_-5054747718510833803WordSection1"><p class="MsoNormal"><span style="font-family:Calibri,sans-serif;font-size:11pt"> </span><br></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">If the loop is being unrolled, what looks like a non-const expression becomes a const expression. So if SomeFunc is marked as pure, the compiler might be able to omit the call completely.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u></span></p></div></div></blockquote></div><br></div><div class="gmail_extra">There were some time testing done with C++ language vs others, where C++ would beat anyone due to such optimization.</div><div class="gmail_extra"><br></div><div class="gmail_extra">thanks,</div><div class="gmail_extra">Dmitry</div></div>