web analytics
Home » Technology » Software » Codon Helps Python Programs Run Faster Than C Code

Codon Helps Python Programs Run Faster Than C Code

python

Computer scientists at MIT are likely to fulfill a great wish of many, especially scientific users: They bring simple Python code to performance values ​​that even surpass classic C programs.

They have developed a system called the codon that aims to combine the best of both worlds. “We found that people don’t necessarily want to learn a new language or tool, especially the non-technical ones. So we thought we’d take Python’s syntax, semantics, and libraries and integrate them into it a new system built from the ground up,” said team leader Ariya Shajii.

After all, the users are usually scientists who are already specialists in their field and only need the programming language as a tool for their research. Accordingly, they want a tool that is as easy to use as possible and doesn’t require worrying about data types or performance optimizations. Codon should take over the handling of these questions automatically.

A little less flexible

Python already brings simplicity with it. It is an interpreted language in which decisions about data types, for example, are only made at runtime. This is convenient but comes at the cost of performance. Python code for codon can also do without specifying data types, but the types are then not specified just-in-time at program runtime, but beforehand.

The system includes a compiler that translates the Python code into machine code. Ultimately, this comes at the expense of flexibility, but this should hardly be noticeable in everyday use. The codon package also includes various modules that bring along libraries for various areas of application, from genetics to finance.

Tests have shown that a codon program used in gene research works with higher performance than code that has been translated into C by a programmer. Currently, users still have to do without the use of dynamic functions, but MIT researchers want to provide this option soon.