Skip to content

Generic function significantly slower than function with specific type #17042

Answered by vzarytovskii
davidbruce asked this question in Q&A
Discussion options

You must be logged in to vote

TL;DR it's likely because of how comparison works in F# (due to comparison constraint).

Generic comparison will be involved (like GenericLessThanIntrinsic, since function is, well, generic), which is not inlined as far as I remember as well as has some logic in it to chose specific implementation.

Replies: 1 comment 2 replies

Comment options

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

@vzarytovskii
Comment options

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