Python和Java和C#和并行算法 [英] Python, Java, C# and parallel algorithms

查看:125
本文介绍了Python和Java和C#和并行算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道:会有在试图建立在Python并行算法什么高招?说我想研究一个新的并行算法,我有C,C#和Python的选择,将一个或另一个是更好来测试和衡量这些算法,或者他们只是功能等同的,除了相关国米$ P $常数PTED /编译/ VM的语言,这都将是一样的吗?谢谢

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

推荐答案

Python是不是因为全球除preTER锁(GIL)适用于这一点,它不以这种方式工作。 C是很难在多线程环境中使用,但有一个选择 - 的Cilk 的语言。 C#是并行编程pretty的不错的选择。您可以使用任务并行库,并发数据结构和PLINQ从.NET Framework 4中。

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.

这篇关于Python和Java和C#和并行算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆