The fastest math programming language?

I have an application that requires millions of subtractions and residuals, I originally programmed this algorithm inside C # .Net, but it takes five minutes to process this information, and I need it faster than that.

I reviewed perl and now it is the best alternative. Vb.net was slower in testing. C ++ could also be better. Any advice would be greatly appreciated.

+6
source share
7 answers

Some computations are regular enough to profit from GPGPUs: the latest graphics cards are essentially specialized massive parallel numerical processors. For example, you can encode number kernels in OpenCL . Otherwise, learn C ++ 11 (no earlier version of the C ++ standard) or C. And in many cases, Ocaml can be almost as fast as C ++, but much easier with the code.

Perhaps your problem can be solved with scilab or R , I did not understand this enough to help more.

And you can use your multi-core processor, for example. using pthreads or mpi

Finally, the Linux operating system may be better at handling massive computations. It is noteworthy that today most supercomputers use it.

+4
source
  • You need a compiled language like Fortran, C or C ++. Other languages ​​are designed to provide you with flexibility, object-oriented orientation, or other benefits, and to accept the fastest performance - this is not your highest priority.

  • Know how to get maximum performance from a single thread, and after you do this, investigate sharing with multiple cores, such as MPI. In order to get maximum performance in a single thread, one thing I do is do one-step work at the machine command level to make sure that it doesn't get by in materials that can be removed.

+8
source

If execution speed is the highest priority, this usually means Fortran.

+3
source

PARI / GP is the best I've used so far. It is written in C.

0
source

The standard tool for mathematical mathematical operations in engineering is often Matlab (either as a free alternative to octave or the already mentioned scilab).

0
source

Try to see the DMelt math program . The program calls the Java libraries. The Java Virtual Machine can optimize long math for you.

0
source

Try Julia : its ability to kill is easy to comment at a high level, while maintaining performance in the same order of magnitude as Fortran / C.

0
source

Source: https://habr.com/ru/post/900874/


All Articles