79351814

Date: 2025-01-13 10:15:16
Score: 2.5
Natty:
Report link

2025 now.

After a lot of testing with c++ and c# I concluded that you need to use a lot of advanced methods in both languages.

That said I think optimising for c# to get already amazing performance was a little easier and faster results.The C# compiler is also really great and multithreading was also more straight forward. Did not use SIMD.

But!! I've also used Halide Lang for some processing of array's. It's a DSL in c++ and if done right it edges out c# by a big margin. It manages SIMD, multithreading and algorithm optimising for a specific architecture for you. The learning curve is rather steep as with everything in c++ when optimising.

Conclusion: always test and benchmark... if you want results faster and don't want to go too deep in a rabbit hole use c#. If it is still to slow and the budget permits it go to c++. I highly recommend Halide Lang as it does a lot of voodoo for you. You can built a DLL and link in C# if needed.

And to answer the question, yes, c++ is potentially (a lot) faster. But is it worth the time and money?

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Dodgy Programmer