<HTML><BODY>> unknown function call is expensive<br><br>So, higher order function always slow. <br>Thus, to improve performance, one should use for/fold, for/list, ... and never use map, foldl, build-string, ... with lambda.<br>Is it correct?<br><br>Sun, 3 Aug 2014 13:15:57 -0400 от Matthias Felleisen <matthias@ccs.neu.edu>:<br>
<blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">
<div id="">
<div class="js-helper js-readmsg-msg">
<style type="text/css"></style>
<div>
<base target="_self" href="https://e.mail.ru/">
<div id="style_14070861750000000898_BODY"><div><br></div><div>Because build-string calls an unknown function 1000 x 100000 times, and an unknown function call is expensive. </div><div><br></div><div>Racket could possible collapse all modules and perform additional in-lining optimizations eventually, which may help here. But it doesn't yet. </div><div><br></div><div>-- Matthias</div><div><br></div><div><br></div><br><div><div>On Aug 3, 2014, at 5:15 AM, Roman Klochkov wrote:</div><br><blockquote type="cite">
<div><p>Are higher order function always slow?<br>...</p><div><div>---<br><br></div></div><div>So I see, that build-string version is about two times slower, than set-in-the-loop. Why so much? I expected about 10-20% difference.</div><br>-- <br>Roman Klochkov</div>
____________________<br> Racket Users list:<br> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br></blockquote></div><br>
</div>
<base target="_self" href="https://e.mail.ru/">
</div>
</div>
</div>
</blockquote>
<br>
<br>-- <br>Roman Klochkov<br></BODY></HTML>