Dias: Dynamic Rewriting of Pandas Code

Author:

Baziotis Stefanos1ORCID,Kang Daniel1ORCID,Mendis Charith1ORCID

Affiliation:

1. University of Illinois (UIUC), Urbana, IL, USA

Abstract

In recent years, dataframe libraries, such as pandas have exploded in popularity. Due to their flexibility, they are increasingly used in ad-hoc exploratory data analysis (EDA) workloads. These workloads are diverse, including custom functions which can span libraries or be written in pure Python. The majority of systems available to accelerate EDA workloads focus on bulk-parallel workloads, which contain vastly different computational patterns, typically within a single library. As a result, they can introduce excessive overheads for ad-hoc EDA workloads due to their expensive optimization techniques. Instead, we identify source-to-source, external program rewriting as a lightweight technique which can optimize across representations, and offer substantial speedups while also avoiding slowdowns. We implemented Dias, which rewrites notebook cells to be more efficient for ad-hoc EDA workloads. We develop techniques for efficient rewrites in Dias, including checking the preconditions under which rewrites are correct, dynamically, at fine-grained program points. We show that Dias can rewrite individual cells to be 57× faster compared to pandas and 1909× faster compared to optimized systems such as modin. Furthermore, Dias can accelerate whole notebooks by up to 3.6× compared to pandas and 27.1× compared to modin.

Publisher

Association for Computing Machinery (ACM)

Reference53 articles.

1. AIEducation. 2022. What course are you going to take? https://www.kaggle.com/code/aieducation/what-course-are-you-going-to-take/. Accessed: 2022--12-09.

2. Python ast module. 2022. https://docs.python.org/3/library/ast.html. Accessed: 2022--12-09.

3. Python ast module: Constant. 2022. https://docs.python.org/3/library/ast.html#ast.Constant. Accessed: 2022--12-09.

4. Ponder | Pandas at Scale. 2022. https://ponder.io/. Accessed: 2022--12-09.

5. Rounak Banik. 2017. Movie Recommender Systems. https://www.kaggle.com/code/rounakbanik/movie-recommender-systems. Accessed: 2022--12-09.

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3