本文介绍了性能(pystone)的python 2.4低于python 2.3 ???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 刚刚在一台机器(RH8.0 Linux)上安装了Python 2.4,它也安装了python 2.3 和python 2.2。后者带有linux发行版,其他 是从源代码压缩包中编译的。 比较它们会产生以下意外结果: [lucas @ oslwb03测试] $ / usr / bin / python pystone.py Pystone(1.1)50000次通过时间= 1.86 这台机器基准价格为26881.7 pystones / second [lucas @ oslwb03测试] $ /usr/local/bin/python2.3 pystone.py Pystone(1.1)时间为50000次= 1.22 这台机器的基准测试点为40983.6 pystones / second 这没关系,速度提高了52%,但是: lucas @ oslwb03 test] $ /usr/local/bin/python2.4 pystone.py Pystone(1.1)50000次通过时间= 1.31 这个机器基准在38167.9 pystones / second 7%的速度降低???根据文档,它应该增加5%? 机器是一个3.0 GHz Xeon盒子。 python 2.3和2.4没有任何选项的配置。 任何了解发生了什么的人? 问候,卢卡斯 解决方案 Hi,Just installed Python 2.4 on a machine (RH8.0 Linux) that also has python 2.3and python 2.2 installed. The latter came with the linux distribution, the otherare compiled from source tarballs.Comparing them gives the following unexpected result:[lucas@oslwb03 test]$ /usr/bin/python pystone.pyPystone(1.1) time for 50000 passes = 1.86This machine benchmarks at 26881.7 pystones/second[lucas@oslwb03 test]$ /usr/local/bin/python2.3 pystone.pyPystone(1.1) time for 50000 passes = 1.22This machine benchmarks at 40983.6 pystones/secondThis is ok, a 52% speed increase, but:lucas@oslwb03 test]$ /usr/local/bin/python2.4 pystone.pyPystone(1.1) time for 50000 passes = 1.31This machine benchmarks at 38167.9 pystones/secondA 7% speed DECREASE??? According to the documentation it should be a 5% increase?The machine is a 3.0 GHz Xeon box.Both python 2.3 and 2.4 where configure without any options.Anyone who understands what is going on?Regards, Lucas 解决方案 这篇关于性能(pystone)的python 2.4低于python 2.3 ???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-14 18:59