why does F# inline cause 11x performance improvement

后端 未结 2 1241
忘掉有多难
忘掉有多难 2021-02-02 12:58

I am working on some heavy cpu bound problem. I see a big performance improvement when I use the inline keyword. I create a dictionary from the standard .net librar

2条回答
  •  被撕碎了的回忆
    2021-02-02 13:19

    Type specialization

    Without inline, you are using generic comparison which is very inefficient. With inline, the genericity is removed and int comparison is used directly.

提交回复
热议问题