JEDI: Java Evaluation of Declarative and Imperative Queries: Benchmarking the Java Stream API
Filippo Schiavio, Walter Binder
Abstract
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Builds on5
- Quantifying TPC-H Choke Points and Their OptimizationsMarkus Dreseler, Martin Boissier, Tilmann Rabl, Matthias UflackerVLDB 2020 · 91 citations
- Rethinking Java Performance AnalysisStephen M. Blackburn, Zixian Cai, Rui Chen, Xi Yang et al.ASPLOS 2025 · 19 citations
- Eliminating abstraction overhead of Java stream pipelines using ahead-of-time program optimizationAnders Møller, Oskar Haarklou VeileborgOOPSLA 2020 · 9 citations
- Language-Agnostic Integrated Queries in a Managed Polyglot RuntimeFilippo Schiavio, Daniele Bonetta, Walter BinderVLDB 2021 · 6 citations
- Imperative versus Declarative Collection Processing: An RCT on the Understandability of Traditional Loops versus the Stream API in JavaNils Mehlhorn, Stefan HanenbergICSE 2022 · 4 citations
Related papers
- Does the Stream API Benefit from Special Debugging Facilities? A Controlled Experiment on Loops and Streams with Specific DebuggersJan Reichl, Stefan Hanenberg, Volker GruhnICSE 2023 · 1 citation
- TiLT: A Time-Centric Approach for Stream Query Optimization and ParallelizationAnand Jayarajan, Wei Zhao, Yudi Sun, Gennady PekhimenkoASPLOS 2023 · 6 citations
- Redbench: Workload Synthesis From Cloud TracesJohannes Wehrstein, Roman Heinrich, Mihail Stoian, Skander Krid et al.VLDB 2026 · 7 citations
- StreamQL: a query language for processing streaming time seriesLingkun Kong, Konstantinos MamourasOOPSLA 2020 · 8 citations
- Stream processing with dependency-guided synchronizationKonstantinos Kallas, Filip Niksic, Caleb Stanford, Rajeev AlurPPoPP 2022 · 4 citations
