我今天学到了关于pystones的知识,所以我决定看看我的各种环境是什么样的.我在我的笔记本电脑上运行了pystones,它在裸机上运行窗口并得到了这些结果
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from test import pystone
>>> for i in range(0,10):
... pystone.pystones()
...
(1.636334799754252, 30556.094026423627)
(2.1157907919853756, 23631.82607155689)
(2.5324817108003685, 19743.479207278437)
(2.541626695533182, 19672.4405231788)
(2.536022267835051, 19715.915208695682)
(2.540327088340973, 19682.50475676099)
(2.544761766911506, 19648.20465716261)
(2.540296805235016, 19682.739393664764)
(2.533851636391205, 19732.804905346253)
(2.536483186973612, 19712.3325148696)
Run Code Online (Sandbox Code Playgroud)
然后我在我们的一些Linux VM上运行它,性能提高了2.7-3.4倍.所以我在我的笔记本电脑上启动了我的vmware Linux VM并重新进行了相同的测试并获得了以下结果:
Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more …Run Code Online (Sandbox Code Playgroud)