Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python, Java, C# and parallel algorithms

I was wondering: would there be any merit in attempting to create parallel algorithms in Python? Say I want to research a new parallel algorithm, and I have the choice of C, C# and Python, would one or the other be "better" to test and benchmark these algorithms, or they are just "functionally equivalent" and, besides the constants associated to interpreted/compiled/vm languages, it would all be the same? Thanks

like image 484
Dervin Thunk Avatar asked Jan 18 '26 09:01

Dervin Thunk


1 Answers

Python is not suitable for this because of global interpreter lock (GIL), it doesn't work this way. C is hard to use in multithreaded environment, but there is an alternative - Cilk language. C# is a pretty nice choice for parallel programming. You can use Task Parallel Library, concurrent data structures and PLINQ from .NET Framework 4.

like image 173
Evgeny Lazin Avatar answered Jan 20 '26 01:01

Evgeny Lazin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!