JEDI: Java声明式与命令式查询评估
JEDI: Java Evaluation of Declarative and Imperative Queries
AI总结:
提出JEDI基准测试套件,通过自动将SQL基准转换为Java基准,分析Stream API与命令式实现的性能差异,以指导开发者优化代码。
摘要:
Java Stream API旨在通过易于阅读的声明式语法提高开发人员生产力,并简化并行计算,在常见并行化方面提供高级抽象。不幸的是,缺乏专门针对基于流的应用程序的基准测试。这种基准测试的缺乏使得Java类库的研究人员和开发人员难以优化Stream API。此外,在没有专用基准测试的情况下,难以分析流的性能,从而向开发人员建议如何使用API编写高效代码。在这项工作中,我们提出了JEDI,一个针对Stream API的基准测试套件。JEDI通过将SQL基准转换为Java基准自动生成。我们的代码生成器支持针对同一查询的不同实现(基于流和命令式)。我们的基准测试套件的最终目标——以及这项工作的主要贡献——是分析不同实现的性能,以发现低效的代码结构和更好的替代方案,向Java开发人员推荐最佳实践。在我们生成的多种实现中,我们关注不同的并行化策略,并根据处理数据的特征解释最有效的并行化策略。最后,生成命令式代码的代码生成定义了一个基线,可以指导研究人员和Java实现者优化Stream API。
英文摘要:
The Java Stream API aims at increasing developer productivity thanks to an easy-to-read declarative syntax to express computations. It also simplifies parallel computing, providing a high-level abstraction on top of common parallelization aspects. Unfortunately, there is a lack of benchmarks specifically targeting stream-based applications. Such a lack of benchmarks makes it difficult for researchers and developers of the Java class library to optimize the Stream API. Moreover, in the absence of dedicated benchmarks, it is difficult to analyze the performance of streams to suggest developers how to write efficient code using the API. In this work we present JEDI, a benchmark suite that targets the Stream API. JEDI is automatically generated by converting SQL benchmarks into Java benchmarks. Our code generator supports targets different implementations (both stream-based and imperative) for the same query. The ultimate goal of our benchmark suite -- and the main contribution of this work -- is to analyze the performance of the different implementations to spot inefficient code structures and better alternatives, suggesting best practices to Java developers. Among the multiple implementations we generate, we focus on different parallelization strategies and explain the most efficient parallelization strategies based on characteristics of the processed data. Finally, the code generation producing imperative code defines of a baseline that can guide researchers and Java implementers to optimize the Stream API.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。