ปัญหานี้แก้ไขได้ด้วย ชุดเครื่องมือวัดประสิทธิภาพในชื่อ "The Python Benchmark Suite"
[caption id="" align="alignnone" width="800"]
รูปภาพที่สร้างจาก bm_raytrace (pure Python raytrace) ในชุดเครื่องมือ The Python Benchmark Suite[/caption]ชุดเครื่องมือ "The Python Benchmark Suite" สามารถทำการทดสอบได้โดยต้องการ virtualenv
สำหรับ CPython สามารถติดตั้งได้ผ่านคำสั่ง
$ pip install performanceสำหรับ Python implementations อื่น สามารถโหลดไฟล์มาติดตั้งได้จาก https://github.com/python/performance แตกไฟล์แล้วใช้คำสั่ง
$ python setup.py installการใช้งานเบื้องต้น
คำสั่งเปรียบเทียบ Python 2 กับ Python 3
pyperformance run --python=python2 -o py2.json
pyperformance run --python=python3 -o py3.json
pyperformance compare py2.json py3.json
อ่านเอกสารได้ที่ https://github.com/python/performance

0 ความคิดเห็น:
แสดงความคิดเห็น
แสดงความคิดเห็นได้ครับ :)