Alex Gaynor 11/8/2009

Another Unladen Swallow Optimization

Read Original

The article details a technical optimization in the Unladen Swallow project for CPython, focusing on replacing the METH_O and METH_NOARGS flags with a new METH_FIXED flag. This change allows direct, faster calls to C functions that take a fixed number of arguments (up to three), avoiding tuple allocation and parsing. It results in a measurable performance boost, specifically a 7% speed increase in a Django benchmark, and discusses limitations and future possibilities for functions with default arguments.

Another Unladen Swallow Optimization

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