Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
pypy 有什么方法可以像运行时那样获得输出python -m cProfile myscript.py吗?
python -m cProfile myscript.py
pypy -m cProfile myscript.py正在显示一些随机数(其中一些为负数),显然这是2011 年尚未修复的错误。
pypy -m cProfile myscript.py
该问题已在 2.5.0 版中修复。cProfile 只能让你走这么远,确保你的热点足够运行以预热 JIT,然后进行基准测试(类似于统计的时间)而不是 cProfile,因为 cProfile 中使用的采样方法本身会减慢速度。