F# performance in scientific computing

前端 未结 10 1183
闹比i
闹比i 2020-12-22 17:12

I am curious as to how F# performance compares to C++ performance? I asked a similar question with regards to Java, and the impression I got was that Java is not suitable f

10条回答
  •  执笔经年
    2020-12-22 17:52

    Here are two examples I can share:

    1. Matrix multiplication: I have a blog post comparing different matrix multiplication implementations.

    2. LBFGS

    I have a large scale logistic regression solver using LBFGS optimization, which is coded in C++. The implementation is well tuned. I modified some code to code in C++/CLI, i.e. I compiled the code into .Net. The .Net version is 3 to 5 times slower than the naive compiled one on different datasets. If you code LBFGS in F#, the performance can not be better than C++/CLI or C#, (but would be very close).

    I have another post on Why F# is the language for data mining, although not quite related to the performance issue you concern here, it is quite related to scientific computing in F#.

提交回复
热议问题