Skip to content

How do InlineIfLambda vs OptimizedClosures.FSharpFunc relate to one another? #14123

Answered by dsyme
abelbraaksma asked this question in Q&A
Discussion options

You must be logged in to vote

@abelbraaksma Great to see the TaskSeq work!

These are really different mechanisms - and I guess I'd just say "use them how they're used in FSharp.Core".

  • Use InlineIfLambda for things that hugely benefit from inlining and flattening, especially things over super-high-perf primitives like arrays.

  • Use OptimizedClosures.FSharpFunc in non-inlined things taking curried functions as parameters and using them in loops

For something like TaskSeq I would not see much use for the former. The latter could reasonably be used quite widely.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@abelbraaksma
Comment options

abelbraaksma Oct 28, 2022
Collaborator Author

@dsyme
Comment options

Answer selected by abelbraaksma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants