一句话:提出利用 Stack Overflow 对比结构抽取数据分析 API 替代实现,并揭示其运行时性能差异。
随着数据规模与复杂度迅速增长,数据分析程序的运行时性能成为开发者关注重点。开发者有时会在保持功能等价的前提下,改用其他数据分析 API 来提升性能,但学界对这类替代 API 的特征与性能属性仍缺乏了解。本文提出一种新方法,利用 Stack Overflow 讨论中的对比结构,抽取调用不同数据分析 API 来解决同一任务的替代实现。评估显示,抽取出的代码对中 86% 被验证为真实替代实现;在这些代码对中,超过 20% 的较快实现相对较慢实现报告了 10 倍或更高的加速。该研究为 API 推荐提供了新视角,并有望推动数据分析程序优化研究。
As data volume and complexity grow at an unprecedented rate, the performance of data analytics programs is becoming a major concern for developers. We observed that developers sometimes use alternative data analytics APIs to improve program runtime performance while preserving functional equivalence. However, little is known on the characteristics and performance attributes of alternative data analytics APIs. In this paper, we propose a novel approach to extracting alternative implementations that invoke different data analytics APIs to solve the same tasks. A key appeal of our approach is that it exploits the comparative structures in Stack Overflow discussions to discover programming alternatives. We show that our approach is promising, as 86% of the extracted code pairs were validated as true alternative implementations. In over 20% of these pairs, the faster implementation was reported to achieve a 10x or more speedup over its slower alternative. We hope that our study offers a new perspective of API recommendation and motivates future research on optimizing data analytics programs.