Speeding Up Data Manipulation Tasks with Alternative Implementations: An Exploratory Study

Speeding Up Data Manipulation Tasks with Alternative Implementations: An Exploratory Study
复制标题

通过替代实现加速数据操作任务:一项探索性研究

DOI:
10.1145/3456873
复制
发表时间:
2021
影响因子:
4.4
通讯作者:
Qin Shengchao
Qin Shengchao
中科院分区:
计算机科学1区
文献类型:
--
作者:
Tao Yida;Tang Shan;Liu Yepang;Xu Zhiwu;Qin Shengchao

文献摘要

相似文献

随着数据量和复杂性以前所未有的速度增长,数据操作程序的性能正成为开发人员关注的主要问题。在本文中,我们研究替代 API 选择如何提高数据操作性能,同时保持特定于任务的输入/输出等效性。我们提出了一种轻量级方法,利用问答网站中的比较结构来提取替代实现。在 Stack Overflow 帖子的大型数据集上,我们的方法提取了 5,080 对替代实现,这些实现调用不同的数据操作 API 来解决相同的任务,准确率为 86%。实验表明,对于 15% 的提取对,较慢的实现相比较慢的实现实现了 10 倍以上的加速。我们还从提取结果中描述了 68 个重复出现的替代 API 对,以了解可以替代使用的 API 类型。为了将这些发现付诸实践,我们实现了一个工具 AlterApi7,来自动优化现实世界的数据操作程序。在 Kaggle 数据集上的 1,267 次优化尝试中,76% 实现了理想的性能改进,加速达到了数量级。最后,我们讨论使用替代 API 来优化数据操作程序的显着挑战。我们希望我们的研究为 API 推荐和自动性能优化提供新的视角。
As data volume and complexity grow at an unprecedented rate, the performance of data manipulation programs is becoming a major concern for developers. In this article, we study how alternative API choices could improve data manipulation performance while preserving task-specific input/output equivalence. We propose a lightweight approach that leverages the comparative structures in Q&A sites to extracting alternative implementations. On a large dataset of Stack Overflow posts, our approach extracts 5,080 pairs of alternative implementations that invoke different data manipulation APIs to solve the same tasks, with an accuracy of 86%. Experiments show that for 15% of the extracted pairs, the faster implementation achieved >10x speedup over its slower alternative. We also characterize 68 recurring alternative API pairs from the extraction results to understand the type of APIs that can be used alternatively. To put these findings into practice, we implement a tool,AlterApi7, to automatically optimize real-world data manipulation programs. In the 1,267 optimization attempts on the Kaggle dataset, 76% achieved desirable performance improvements with up to orders-of-magnitude speedup. Finally, we discuss notable challenges of using alternative APIs for optimizing data manipulation programs. We hope that our study offers a new perspective on API recommendation and automatic performance optimization.