Numba is a game-changing compiler for high-performance computing with Python. It produces machine code that runs outside of the single-threaded Python interpreter and that fully utilizes the resources of modern CPUs. This means support for parallel multithreading and auto vectorization if available, as with compiled languages such as C++ or Fortran. In this article we document our experience developing PyExaFMM, a multithreaded Numba implementation of the Fast Multipole Method, an algorithm with a non-linear data structure and a large amount of data organization. We find that designing performant Numba code for complex algorithms can be as challenging as writing in a compiled language.
翻译:Numba 是使用 Python 进行高性能计算的一个游戏转换编译器。 它生成了在单轨 Python 解释器之外运行的机器代码, 并充分利用了现代CPU的资源。 这意味着支持平行的多读和自动向量化, 如使用C++ 或 Fortran 等已编译的语言。 在此文章中, 我们记录了我们开发 PyExaFMM 的经验, PyExaFMM 是一个多轨化的“ 快速多极方法” 的Numba 实施程序, 一种带有非线性数据结构和大量数据组织的算法。 我们发现, 为复杂算法设计 性 Numba 代码, 可能像以已编译的语言写一样具有挑战性 。</s>