[racket] Performance. Higher-order function

From: Roman Klochkov (kalimehtar at mail.ru)
Date: Sun Aug 3 23:42:53 EDT 2014

 > unknown function call is expensive

So, higher order function always slow. 
Thus, to improve performance, one should use for/fold, for/list, ... and never use map, foldl, build-string, ... with lambda.
Is it correct?

Sun, 3 Aug 2014 13:15:57 -0400 от Matthias Felleisen <matthias at ccs.neu.edu>:
>
>Because build-string calls an unknown function 1000 x 100000 times, and an unknown function call is expensive. 
>
>Racket could possible collapse all modules and perform additional in-lining optimizations eventually, which may help here. But it doesn't yet. 
>
>-- Matthias
>
>
>
>On Aug 3, 2014, at 5:15 AM, Roman Klochkov wrote:
>>Are higher order function always slow?
>>...
>>---
>>
>>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.
>>-- 
>>Roman Klochkov ____________________
>> Racket Users list:
>>  http://lists.racket-lang.org/users
>


-- 
Roman Klochkov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140804/d911f372/attachment.html>

Posted on the users mailing list.