> 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 <matth...@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
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to