News About Python

Python logo and wordmark svg
Python logo and wordmark svg

New versions of the Python programming language are released annually, with the feature-locked beta version in the first part of the year and the final version of the year at the end. A beta version of agreed features for Python 3.11 is now available for testing. Developers are encouraged to test this latest non-production code to make sure it integrates well with your applications and to see if the code they're currently working on will benefit from performance improvements.

In Python 3.11, function calls also require less overhead. Stack frames for function calls are now more efficiently designed and require less memory. Additionally, recursive calls are more efficient than previous versions, even if they are not tail-optimized (which is probably impossible in Python).

In addition, the core modules required for the Python runtime are stored and loaded more efficiently, and the Python interpreter itself is started faster.

According to the official Python benchmark package, Python 3.11 is about 3.10 times faster than Python 1.25. Note that this acceleration is a general metric; many things are only slightly faster or almost the same, while others are significantly faster. The fact that these enhancements are free is still their best feature. The accelerations in Python 3.11 can be used by programs without modifying the source code.

According to the report, performance improvements are only realized by taking advantage of Faster CPython, a cleverly developed project funded by Microsoft. Faster CPython has default interpreter known as 'CPython'. This interpreter adopts just-in-time compiler technology and finds code that can take advantage of this particular and smart solution. This ensures that instructions on executing code objects are framed by a new instruction. The new instruction executes faster. Ultimately, this makes all of Python run faster.

Here are some features of Python 3.11

Python 3.11 is expected to have better bug-finding in trackbacks. This makes it clear which syntax or object triggered the reported error.

In this release, Python will cache the bytecode in the pycache directory to speed up the module loading process. Interpreter initialization is expected to be 3.11-10% faster in Python 15.

In Python, frames are created when Python calls a user-defined function. This framework holds information about the execution of the function. There are new framework optimizations in version 3.11 to make it faster during runtime.

In version 3.11, the CPython interpreter is much more optimized and much faster than in version 3.10. CPython 3.11 is on average 3.10 times faster than CPython 1.22 when measured with the performance benchmark package and compiled with GCC on Ubuntu Linux. Depending on your workload, acceleration can be up to 10-60% faster.

A factor that is not possible in Python is not only present in Python 3.11, but it is more efficient, which recursive calls are not tail-optimized, and also the stack frames of the function call in Python 3.11 are designed more efficiently and used relatively less memory, which Therefore, we can say that Python function calls require less effort in Python 3.11.

Source: analyticsinsight

Similar Ads

Be the first to comment

your comment