Підвищення продуктивності коду мовою РYТНОN з використанням техніки переписувальних правил

dc.contributor.authorЖереб, К.А.
dc.date.accessioned2021-09-29T15:43:16Z
dc.date.available2021-09-29T15:43:16Z
dc.date.issued2020
dc.description.abstractЗапропоновано підхід підвищення продуктивності коду, написаного мовою Python, шляхом перетворення фрагментів коду до більш ефективних мов Cython та C++. Використано високорівневі алгебраїчні моделі та техніку переписувальних правил для автоматизації перетворень програмного коду. Проведено порівняння часу виконання простих програм – початкової версії мовою Python, різних версій перетвореного коду, а також автоматичних засобів Cython та PyPy, що демонструє ефективність запропонованого підходу.uk_UA
dc.description.abstractПредложен подход повышения производительности кода, написанного на языке Python, с помощью преобразования фрагментов кода в более эффективные языки Cython и C ++. Использованы высокоуровневые алгебраические модели и техника переписывающих правил для автоматизации преобразований кода. Проведено сравнение времени выполнения простых программ – начальной версии на языке Python, различных версий преобразованного кода, а также автоматических средств Cython и PyPy, что демонстрирует эффективность предложенного подхода.uk_UA
dc.description.abstractPython is a popular programming language used in many areas, but its performance is significantly lower than many compiled languages. We propose an approach to increasing performance of Python code by transforming fragments of code to more efficient languages such as Cython and C++. We use high-level algebraic models and rewriting rules technique for semi-automated code transformation. Performance-critical fragments of code are transformed into a low-level syntax model using Python parser. Then this low-level model is further transformed into a high-level algebraic model that is language-independent and easier to work with. The transformation is automated using rewriting rules implemented in Termware system. We also improve the constructed high-level model by deducing additional information such as data types and constraints. From this enhanced high-level model of code we generate equivalent fragments of code using code generators for Cython and C++ languages. Cython code is seamlessly integrated with Python code, and for C++ code we generate a small utility file in Cython that also integrates this code with Python. This way, the bulk of program code can stay in Python and benefit from its facilities, but performance-critical fragments of code are transformed into more efficient equivalents, improving the performance of resulting program. Comparison of execution times between initial version of Python code, different versions of transformed code and using automatic tools such as Cython compiler and PyPy demonstrates the benefits of our approach – we have achieved performance gains of over 50x compared to the initial version written in Python, and over 2x compared to the best automatic tool we have tested.uk_UA
dc.identifier.citationПідвищення продуктивності коду мовою РYТНОN з використанням техніки переписувальних правил / К.А. Жереб // Проблеми програмування. — 2020. — № 2-3. — С. 115-125. — Бібліогр.: 13 назв. — укр.uk_UA
dc.identifier.issn1727-4907
dc.identifier.otherDOI: https://doi.org/10.15407/pp2020.02-03.115
dc.identifier.udc004.4'24
dc.identifier.urihttps://nasplib.isofts.kiev.ua/handle/123456789/180457
dc.language.isoukuk_UA
dc.publisherІнститут програмних систем НАН Україниuk_UA
dc.relation.ispartofПроблеми програмування
dc.statuspublished earlieruk_UA
dc.subjectПаралельне програмування. Розподілені системи і мережіuk_UA
dc.titleПідвищення продуктивності коду мовою РYТНОN з використанням техніки переписувальних правилuk_UA
dc.title.alternativeПовышение производительности кода на языке РYТНОN с использованием техники переписывающих правилuk_UA
dc.title.alternativeImproving performance of Python code using rewriting rules techniqueuk_UA
dc.typeArticleuk_UA

Файли

Оригінальний контейнер

Зараз показуємо 1 - 1 з 1
Завантаження...
Ескіз
Назва:
11-Zhereb.pdf
Розмір:
817.29 KB
Формат:
Adobe Portable Document Format

Контейнер ліцензії

Зараз показуємо 1 - 1 з 1
Завантаження...
Ескіз
Назва:
license.txt
Розмір:
817 B
Формат:
Item-specific license agreed upon to submission
Опис: