Toward Efficient Interactions between Python and Native Libraries

06/11/2021
by   Jialiang Tan, et al.
0

Python has become a popular programming language because of its excellent programmability. Many modern software packages utilize Python for high-level algorithm design and depend on native libraries written in C/C++/Fortran for efficient computation kernels. Interaction between Python code and native libraries introduces performance losses because of the abstraction lying on the boundary of Python and native libraries. On the one side, Python code, typically run with interpretation, is disjoint from its execution behavior. On the other side, native libraries do not include program semantics to understand algorithm defects. To understand the interaction inefficiencies, we extensively study a large collection of Python software packages and categorize them according to the root causes of inefficiencies. We extract two inefficiency patterns that are common in interaction inefficiencies. Based on these patterns, we develop PieProf, a lightweight profiler, to pinpoint interaction inefficiencies in Python applications. The principle of PieProf is to measure the inefficiencies in the native execution and associate inefficiencies with high-level Python code to provide a holistic view. Guided by PieProf, we optimize 17 real-world applications, yielding speedups up to 6.3× on application level.

READ FULL TEXT
research
06/28/2022

Improving Tese Case Generation for Python Native Libraries Through Constraints on Input Data Structures

Modern Python projects execute computational functions using native libr...
research
04/01/2021

Using Python for Model Inference in Deep Learning

Python has become the de-facto language for training deep neural network...
research
01/05/2023

Serenity: Library Based Python Code Analysis for Code Completion and Automated Machine Learning

Dynamically typed languages such as Python have become very popular. Amo...
research
08/28/2018

PyDraw: a GUI drawing generator based on Tkinter and its design concept

The emergence of GUI is a great progress in the history of computer scie...
research
01/29/2013

PyXNAT: XNAT in Python

As neuroimaging databases grow in size and complexity, the time research...
research
12/15/2022

Triangulating Python Performance Issues with Scalene

This paper proposes Scalene, a profiler specialized for Python. Scalene ...
research
08/31/2018

PythonRobotics: a Python code collection of robotics algorithms

This paper describes an Open Source Software (OSS) project: PythonRoboti...

Please sign up or login with your details

Forgot password? Click here to reset