Windows上的Python性能 [英] Python Performance on Windows

查看:102
本文介绍了Windows上的Python性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与* nix机器相比,Windows上的Python通常是否较慢? Python似乎在我的Mac OS X机器上大放异彩,而似乎在Windows的Vista机器上运行得更慢.这些机器的处理能力类似,而Vista机器则具有1GB以上的内存.

我在Mercurial中特别注意到了这一点,但我认为这可能只是Mercurial在Windows上打包的方式.

解决方案

我想对此进行跟进,发现了一些我认为是我的答案"的东西.看来Windows(vista,这是我注意到的)在处理文件方面没有那么快. tony-p-lee提到了这一点.

我发现 Ubuntu vs Vista vs Win7 .他们的结果很有趣,而且就像他们说的那样,您需要一小撮盐就可以得出结果.但是我认为结果导致了我的原因.我认为Python是经过间接测试的,它在Windows上的速度差不多,甚至不是快一点..请参阅"Richards基准测试"部分.

这是他们的文件传输图:


(来源: tuxradar.com )

我认为这特别有助于解决这个问题,因为Hg实际上只是一系列文件读取,复制和整体处理.可能是造成延迟的原因.

http://www.tuxradar.com /content/benchmarked-ubuntu-vs-vista-vs-windows-7

Is Python generally slower on Windows vs. a *nix machine? Python seems to blaze on my Mac OS X machine whereas it seems to run slower on my Window's Vista machine. The machines are similar in processing power and the vista machine has 1GBs more memory.

I particularly notice this in Mercurial but I figure this may simply be how Mercurial is packaged on windows.

解决方案

I wanted to follow up on this and I found something that I believe is 'my answer'. It appears that Windows (vista, which is what I notice this on) is not as fast in handling files. This was mentioned by tony-p-lee.

I found this comparisons of Ubuntu vs Vista vs Win7. Their results are interesting and like they say, you need to take the results with a grain of salt. But I think the results lead me to the cause. Python, which I feel was indirectly tested, is about equivalent if not a tad-bit faster on Windows.. See the section "Richards benchmark".

Here is their graph for file transfers:


(source: tuxradar.com)

I think this specifically help address the question because Hg is really just a series of file reads, copies and overall handling. Its likely this is causing the delay.

http://www.tuxradar.com/content/benchmarked-ubuntu-vs-vista-vs-windows-7

这篇关于Windows上的Python性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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