如何IronPython的速度比其他.NET语言? [英] How does ironpython speed compare to other .net languages?

查看:247
本文介绍了如何IronPython的速度比其他.NET语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想给源我在说什么,但我就是没有他们,这件事情我听说过。

I would like to give sources for what I'm saying but I just dont have them, it's something I heard.

在编程的教授告诉我,在某些特定的项目进行到.NET VS Python的一些软件的标杆它给了5个关系:支持.NET的8。这是他赞成Python中没有比.NET

Once a programming professor told me that some software benchmarking done to .net vs Python in some particular items it gave a relation of 5:8 in favor of .NET . That was his argument in favor of Python not being so much slower than .NET

这事情是这样的,我想尝试IronPython的,因为我可以结合web框架我所知道的最(asp.net)与我最喜欢的(Python)的语言,我想知道的程序在速度asp.net在Python VS与VB.net或C#程序在ASP.NET中的速度。是否有任何这软件的标杆?

Here it's the thing, I would like to try IronPython since I could combine the web framework I know the most (asp.net) with the language I like the most (Python) and I was wondering about the speed of programs in asp.net in Python vs the speed of programs in ASP.NET with VB.net or C#. Is there any software benchmarking on this?

此外,不应该的IronPython的速度相比其他.NET语言是相似的,因为不同的IronPython Python的已编译的.NET中间code?可有人微启我对这些问题的?

Also, shouldnt the speeds of IronPython compared to other .NET languages be similar, since IronPython unlike Python have to compile to the .NET intermediate code? Can someone enlight me on these issues?

问候

推荐答案

下面是与IronPython的,CPython的,和C#(其中包括)之间的比较两个有趣的链接:

Here are two interesting links with comparisons between IronPython, CPython, and C# (among others):

  • 在CPython中对C#(单声道)<一href="http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=python&lang2=csharp&box=1">benchmarks,基于详细的现场几个方案。
  • 在CPython的VS IronPython的<一个href="http://ironpython.$c$cplex.com/wikipage?title=IP26RC2VsCPy26Perf&referringTitle=IronPython%20Performance">benchmarks,基于PyStone和PyBench,为版本2.6。
  • CPython vs C# (Mono) benchmarks, based on several programs detailed on the site.
  • CPython vs IronPython benchmarks, based on PyStone and PyBench, for versions 2.6.

因此​​很明显,它沿着你的教授告诉你的线条。但你也知道,这要看这么多东西,你正在使用。

So apparently it does along the lines of what your professor told you. But as you know, it depends so much on what you are using.

的差别主要是由于在Python使用的对象的动态特性,而C#是强类型。因此,IronPython的使用一个以上级别(DLR - 动态语言运行时)在什么C#是从(CLR的 - 公共语言运行库)运行上面,以解决这种差异

The difference is mainly due to the dynamic nature of the objects used in Python, whereas C# is strongly typed. So IronPython uses one more level (the DLR - Dynamic Language Runtime) on top of what C# is run from (the CLR - the Common Language Runtime), to resolve this difference.

我通常不喜欢引用维基百科的文章,但是这是一个很好的起点:<一href="http://en.wikipedia.org/wiki/Dynamic%5FLanguage%5FRuntime">http://en.wikipedia.org/wiki/Dynamic_Language_Runtime

I usually hate to cite Wikipedia articles, but this is a good starting point: http://en.wikipedia.org/wiki/Dynamic_Language_Runtime

现在回来到您的项目,表演可能会更加依赖于你的算法/启发式扫描 - 如何查询数据库为例 - 比上的语言。如果你熟悉的web框架,是满意的,它与同一环境中坚持,而不是收获的东西可能百分之几,你就必须先驯服一个好主意。如果应用程序是CPU密集型的,当然它不会是一样的。

Now to come back to your project, the performances will probably be more dependent on your algorithms/heuristics - how you query a database for example - than on the language. If you are familiar with a web framework and are happy with it, it's a good idea to stick with the same environment rather than gain a possible few percents on something you'll have to tame first. It wouldn't be the same if the application was CPU-intensive of course.

这篇关于如何IronPython的速度比其他.NET语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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