Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How fast is VB .net compared to native code for arithmetic?

I need to write software that will do a lot of math. Mostly it will be matrix multiplication with integers to compute DCT. How much faster should I expect the code to run in native c as compared to VB .Net? Factor of 2, factor of 10, factor of 1000...? Has someone tried and collected statistics on this?

like image 637
Eyal Avatar asked May 14 '26 07:05

Eyal


1 Answers

.Net code is JIT-compiled to native code before execution, so it should not be slower than native code in general. I'd expect a factor < 10.

Moreover, adaptive optimization techniques profile the code as it runs, gaining more information than a typical static compiler. So, the JIT can make more informed decisions for further optimizations

like image 97
Ahmed Abdelkader Avatar answered May 16 '26 06:05

Ahmed Abdelkader