Alex Gaynor 7/15/2013

Your tests are not a benchmark

Read Original

This article clarifies why running a test suite under PyPy often yields slower results than the actual application. It details how PyPy's Just-In-Time (JIT) compiler requires repeated code execution to optimize, a condition rarely met in short, one-off tests. It also covers how test-specific activities like monkey-patching cause deoptimization, making tests unsuitable for benchmarking PyPy's real-world performance.

Your tests are not a benchmark

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes