Self-teaching how to code with Python, part 2: Basic Concepts

in python •  6 years ago  (edited)


Python implementation alternatives

CPython


Is the standard, fastest, more complete an usually the most robust implementation of Python. Its name comes from the fact that it is coded in portable ANSI C standarized language. It is also the implementation that come by default in Linux and Mac OS X machines.

Jython


The Jython (originally known as JPython) is an implementation of the Python language ment to integrate with the Java programming language. In a nutshell Jython has several Java classes that compiles Python source code into Java byte, then Java byte code is routed to the Java Virtual Machin (JVM).

The integration also offers support to import and usage of Java classes as they were coded in Python language. Jython is used by Java developers who seek to have a scripting language as a frontend for java code.

IronPython


IronPython is an implementation designed to allow programs coded with Python to operate with Microsoft's .NET framework and its Open Source alternative. IronPython allows client and server features to grant accesibility to other .NET languages.

Execution Optimizations Tools

The Psyco just-in-time compiler


The Psyco system extends the byte code execution workflow to make coded programs in Python run faster. Psyco is an enhancement of the Python Virtual Machine that collects portions of the program's byte code and converts it to binary machine code in order to boost program execution speed without the need of editing or recompiling the code. This translation occurs at program runtime, because of that Psyco is called a just-in-time (JIT) compiler.

Broadly, Psyco gathers information about the types of objects that are contained in the source code and generate binary code for those tailored for those object types. Then the binary code replaces their corresponding equivalents in the byte code file accelerating the overall time execution of the Python program. This enhances 2x to 100x, the mean is around 4x, the speed execution time of an unmodified Python interpreter and unmodified source code.

The Shedskin C++ translator


The Shedskin C++ translator is a tool still under development status, it attempts to translate Python source code to C++ code which is later by compiled by the computer's local C++ compiler to binary code. Many features are still not supported, but it has produced 2-20x speed increase compared with Psyco in some tests. Thus, it will be an interesting project to be updated with.

Shedskin C++ translator GitHub repository could be accessed here

Previous work

Basic Concepts. Part 1

Sources:

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Pythan lovers....😍
wants to start pythan loved to read this article...
but what is shedskin c++ translator.
what's its purpose or workin..??

Shedskin C++ translator is an early stage project that tries to translate Python Source code to C++ code.

Its purpose is to boost program execution speed time since CPython's standard architecture provides a slower performance than that of Compiled programs. This much is what I currently understand since I am self-teaching how to code starting from zero previous knowledge

If you know any further information about this topic, please feel free to share it in a comment.

Best regards.

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by joelsegovia from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.

This post has received a 17.39 % upvote from @boomerang.

Eres increible.....jejejej

Gracias hermano