Журнал «Современная Наука»

Russian (CIS)English (United Kingdom)
MOSCOW +7(495)-142-86-81

Using the Python → 11l → C ++ Transpiler for Competitive Programming

Tretyak Alexander Viktorovich  (postgraduate student, Far Eastern Federal University, Vladivostok)

Vereshchagina Elena Aleksandrovna  (Ph.D. of Engineering Sciences, Associate Professor, Far Eastern Federal University, Vladivostok)

Dobrzhinskij Yuri Vyacheslavovich  (Ph.D. of Engineering Sciences, Senior Research Fellow, Far Eastern Federal University, Vladivostok)

Zakharchenko Daniil Vladimirovich  (postgraduate student, Far Eastern Federal University, Vladivostok)

Nowadays Python programming language is becoming more and more popular, as well as for solving competitive programming problems. But since Python is a scripting language with dynamic typing, when solving some problems its performance is not enough and programs written in Python do not pass all the tests in the allowed time. To solve this issue it is proposed to use the Python → 11l → C++ transpiler which translates some subset of the Python programming language into C++, which significantly speeds up Python code execution (often by more than an order of magnitude). The aim of the paper is to show the specialties of this transpiler, which must be taken into account when writing Python code so that it can be correctly compiled with this transpiler. As a result, the proposed method for accelerating program code in Python can be used as a solution to the problem of insufficient performance of the original and alternative Python implementations, as a result of which there is no need to solve problems in more high-performance, but less convenient programming languages (for example, C++). An element of novelty is that the proposed transpiler in practice is not inferior in performance to the C++ language (which is not as convenient as Python in terms of syntax, including for solving competitive programming problems), unlike other similar tools for accelerating and/or executing Python code, such as Cython, PyPy, Nuitka and Shed Skin. Practical significance. This transpiler can be used to solve competitive programming problems.

Keywords:transpiler, competitive programming, programming languages

 

Read the full article …



Citation link:
Tretyak A. V., Vereshchagina E. A., Dobrzhinskij Y. V., Zakharchenko D. V. Using the Python → 11l → C ++ Transpiler for Competitive Programming // Современная наука: актуальные проблемы теории и практики. Серия: Естественные и Технические Науки. -2021. -№07. -С. 115-122 DOI 10.37882/2223-2966.2021.07.32
LEGAL INFORMATION:
Reproduction of materials is permitted only for non-commercial purposes with reference to the original publication. Protected by the laws of the Russian Federation. Any violations of the law are prosecuted.
© ООО "Научные технологии"