Migrating Legacy Fortran to Python While Retaining Fortran-Level Performance through Transpilation and Type Hints

Mateusz Bysiek, Aleksandr Drozd, S. Matsuoka
{"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}
引用次数: 10

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).
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
将传统的Fortran迁移到Python,同时通过编译和类型提示保留Fortran级别的性能
我们提出了一种利用Python 3.5中引入的类型提示机制通过实时编译来加速Python代码的方法。在我们的方法中,性能关键型内核的编写就好像Python是一种严格类型的语言一样,但是不需要扩展Python语法。这种方法可以应用于任何Python应用程序,但是我们关注的是一种特殊情况,即遗留的Fortran应用程序被自动转换为Python,以便于维护。我们开发了一个实现双向转译的框架,并获得了与Python手动转换为Fortran的性能相当的性能,并且比使用其他当前可用的JIT替代品更好(在某些实验中比Numba快5倍)。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Migrating Legacy Fortran to Python While Retaining Fortran-Level Performance through Transpilation and Type Hints Boosting Python Performance on Intel Processors: A Case Study of Optimizing Music Recognition PALLADIO: A Parallel Framework for Robust Variable Selection in High-Dimensional Data Dynamic Provisioning and Execution of HPC Workflows Using Python Mrs: High Performance MapReduce for Iterative and Asynchronous Algorithms in Python
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1