将传统的Fortran迁移到Python,同时通过编译和类型提示保留Fortran级别的性能

Mateusz Bysiek, Aleksandr Drozd, S. Matsuoka
{"title":"将传统的Fortran迁移到Python,同时通过编译和类型提示保留Fortran级别的性能","authors":"Mateusz Bysiek, Aleksandr Drozd, S. Matsuoka","doi":"10.1109/PYHPC.2016.12","DOIUrl":null,"url":null,"abstract":"We propose a method of accelerating Python code by just-in-time compilation leveraging type hints mechanism introduced in Python 3.5. In our approach performance-critical kernels are expected to be written as if Python was a strictly typed language, however without the need to extend Python syntax. This approach can be applied to any Python application, however we focus on a special case when legacy Fortran applications are automatically translated into Python for easier maintenance. We developed a framework implementing two-way transpilation and achieved performance equivalent to that of Python manually translated to Fortran, and better than using other currently available JIT alternatives (up to 5x times faster than Numba in some experiments).","PeriodicalId":178771,"journal":{"name":"2016 6th Workshop on Python for High-Performance and Scientific Computing (PyHPC)","volume":"13 4","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-11-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"10","resultStr":"{\"title\":\"Migrating Legacy Fortran to Python While Retaining Fortran-Level Performance through Transpilation and Type Hints\",\"authors\":\"Mateusz Bysiek, Aleksandr Drozd, S. Matsuoka\",\"doi\":\"10.1109/PYHPC.2016.12\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We propose a method of accelerating Python code by just-in-time compilation leveraging type hints mechanism introduced in Python 3.5. In our approach performance-critical kernels are expected to be written as if Python was a strictly typed language, however without the need to extend Python syntax. This approach can be applied to any Python application, however we focus on a special case when legacy Fortran applications are automatically translated into Python for easier maintenance. We developed a framework implementing two-way transpilation and achieved performance equivalent to that of Python manually translated to Fortran, and better than using other currently available JIT alternatives (up to 5x times faster than Numba in some experiments).\",\"PeriodicalId\":178771,\"journal\":{\"name\":\"2016 6th Workshop on Python for High-Performance and Scientific Computing (PyHPC)\",\"volume\":\"13 4\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2016-11-13\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"10\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2016 6th Workshop on Python for High-Performance and Scientific Computing (PyHPC)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/PYHPC.2016.12\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2016 6th Workshop on Python for High-Performance and Scientific Computing (PyHPC)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/PYHPC.2016.12","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 10

摘要

我们提出了一种利用Python 3.5中引入的类型提示机制通过实时编译来加速Python代码的方法。在我们的方法中,性能关键型内核的编写就好像Python是一种严格类型的语言一样,但是不需要扩展Python语法。这种方法可以应用于任何Python应用程序,但是我们关注的是一种特殊情况,即遗留的Fortran应用程序被自动转换为Python,以便于维护。我们开发了一个实现双向转译的框架,并获得了与Python手动转换为Fortran的性能相当的性能,并且比使用其他当前可用的JIT替代品更好(在某些实验中比Numba快5倍)。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Migrating Legacy Fortran to Python While Retaining Fortran-Level Performance through Transpilation and Type Hints
We propose a method of accelerating Python code by just-in-time compilation leveraging type hints mechanism introduced in Python 3.5. In our approach performance-critical kernels are expected to be written as if Python was a strictly typed language, however without the need to extend Python syntax. This approach can be applied to any Python application, however we focus on a special case when legacy Fortran applications are automatically translated into Python for easier maintenance. We developed a framework implementing two-way transpilation and achieved performance equivalent to that of Python manually translated to Fortran, and better than using other currently available JIT alternatives (up to 5x times faster than Numba in some experiments).
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信