3 ms·
Cool! But what if I write a more complex program that I want to perform well? Is it easy to understand where the compiler will or won't do this crazy fusion thi
by cousin_it 17y ago
Cool! But what if I write a more complex program that I want to perform well? Is it easy to understand where the compiler will or won't do this crazy fusion thing?
- dons 17y agoIt's pretty easy to work out where fusion is going to happen, since it happens compositionally. You compose fusible functions, and the (.) between them is syntactically where fusion occurs. GHC will tell you how many fusion sites were found.
- eru 17y agoYou can also add your own fusion rules, as far as I know.