为了调试ironpython脚本,我尝试使用py魅力。由于py魅力在调试模式下运行得非常慢,所以它运行得很差。我意识到我们可以预期会有一些放缓,但我正在经历大约200倍的减速。下面是我的成果:
正常运行:
"C:\Program Files (x86)\IronPython 2.7\ipy.exe" C:/Users/melchoir55/PycharmProjects/pystone/pystone.py
Pystone(1.1) time for 50000 passes = 0.270744
This machine benchmarks at 184676 pystones/second
调试器:
"C:\Program Files (x86)\IronPython 2.7\ipy.exe" -X:Frames "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 3.0.1\helpers\pydev\pydevd.py" --multiproc --client 127.0.0.1 --port 52669 --file C:/Users/melchoir55/PycharmProjects/pystone/pystone.py
pydev debugger: warning: sys._current_frames is not supported in Python 2.4, it is recommended to install threadframe module
pydev debugger: warning: See http://majid.info/blog/threadframe-multithreaded-stack-frame-extraction-for-python/
pydev debugger: process 9064 is connecting
Connected to pydev debugger (build 131.339)
Pystone(1.1) time for 50000 passes = 71.5615
This machine benchmarks at 698.700 pystones/second
有人知道这是怎么回事吗?
发布于 2013-11-05 20:32:33
问题出在铁蟒上。显然,ipy不适合调试器。我再次使用相同的调试器(eclipse、py魅力、visual studio)运行pystone,但这次使用的是常规python发行版,而不是ironpython。结果要好得多:
标准python:正常运行:
Pystone(1.1) time for 50000 passes = 0.462739
This machine benchmarks at 108052 pystones/second
使用标准python运行调试:
pydev debugger: starting
Pystone(1.1) time for 50000 passes = 4.49224
This machine benchmarks at 11130.3 pystones/second
因此,常规python仍然在调试模式中经历了显著的减速,但与ironpython所经历的放缓相比没有什么。如果您遇到了这个问题,您可能会考虑放弃铁dumping。
https://stackoverflow.com/questions/19735254
复制相似问题