Re: Is there a way to make this code compose generic ?
PICCA Frederic-Emmanuel <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cafe |
|---|---|
| Message-ID | <986712287.104324585.1745571084667.JavaMail.zimbra@synchrotron-soleil.fr> |
> In principle there shouldn't be any impact on performance. Type classes are > resolved at compile time, and you only use the generic implementations at known > types. All of the relevant dictionaries are known at compile-time, so with > enough inlining and simplification the generic constructors and other > indirections should be eliminated. > In practice, inlining is still very heuristic, so you have to look at the > generated code and maybe add INLINEABLE annotations and tweak other things to > make sure it happens. The inspection-testing library > (https://hackage.haskell.org/package/inspection-testing) enables automated > tests that make sure that the code optimized by the compiler doesn't contain > certain constructs that indicate missed inlining opportunities. Thanks a lot, I will use this and see what is going one. Fred _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.